Skip to content
Snippets Groups Projects
Verified Commit 570e7b2a authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets
Browse files

Change some files

parent 6f6d7e7e
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -6,12 +6,18 @@ module Popen
 
def popen(cmd, path=nil)
unless cmd.is_a?(Array)
raise "System commands must be given as an array of strings"
raise RuntimeError, "System commands must be given as an array of strings"
end
 
path ||= Dir.pwd
vars = { "PWD" => path }
options = { chdir: path }
vars = {
"PWD" => path
}
options = {
chdir: path
}
 
unless File.directory?(path)
FileUtils.mkdir_p(path)
Loading
Loading
@@ -19,6 +25,7 @@ module Popen
 
@cmd_output = ""
@cmd_status = 0
Open3.popen3(vars, *cmd, options) do |stdin, stdout, stderr, wait_thr|
@cmd_output << stdout.read
@cmd_output << stderr.read
Loading
Loading
Loading
Loading
@@ -19,14 +19,12 @@ module Gitlab
end
 
def archive_formats_regex
#|zip|tar| tar.gz | tar.bz2 |
/(zip|tar|tar\.gz|tgz|gz|tar\.bz2|tbz|tbz2|tb2|bz2)/
/(zip|tar|7z|tar\.gz|tgz|gz|tar\.bz2|tbz|tbz2|tb2|bz2)/
end
 
def git_reference_regex
# Valid git ref regex, see:
# https://www.kernel.org/pub/software/scm/git/docs/git-check-ref-format.html
%r{
(?!
(?# doesn't begins with)
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment