Use multiple argument form of system
This commit is contained in:
parent
8667387bee
commit
f0e13ee97b
@ -147,8 +147,8 @@ class Build
|
||||
|
||||
f.brew do
|
||||
if ARGV.flag? '--git'
|
||||
system "git init"
|
||||
system "git add -A"
|
||||
system "git", "init"
|
||||
system "git", "add", "-A"
|
||||
end
|
||||
if ARGV.interactive?
|
||||
ohai "Entering interactive mode"
|
||||
|
||||
@ -21,7 +21,7 @@ module Homebrew
|
||||
# we downcase to avoid case-insensitive filesystem issues
|
||||
tapd = HOMEBREW_LIBRARY/"Taps/#{user.downcase}/homebrew-#{repo.downcase}"
|
||||
return false if tapd.directory?
|
||||
abort unless system "git clone https://github.com/#{repouser}/homebrew-#{repo} #{tapd}"
|
||||
abort unless system "git", "clone", "https://github.com/#{repouser}/homebrew-#{repo}", tapd.to_s
|
||||
|
||||
files = []
|
||||
tapd.find_formula { |file| files << file }
|
||||
|
||||
@ -77,17 +77,17 @@ module Homebrew
|
||||
private
|
||||
|
||||
def git_init_if_necessary
|
||||
if Dir['.git/*'].empty?
|
||||
safe_system "git init"
|
||||
safe_system "git config core.autocrlf false"
|
||||
safe_system "git remote add origin https://github.com/Homebrew/homebrew.git"
|
||||
safe_system "git fetch origin"
|
||||
safe_system "git reset --hard origin/master"
|
||||
if Dir[".git/*"].empty?
|
||||
safe_system "git", "init"
|
||||
safe_system "git", "config", "core.autocrlf", "false"
|
||||
safe_system "git", "remote", "add", "origin", "https://github.com/Homebrew/homebrew.git"
|
||||
safe_system "git", "fetch", "origin"
|
||||
safe_system "git", "reset", "--hard", "origin/master"
|
||||
end
|
||||
|
||||
if `git remote show origin -n` =~ /Fetch URL: \S+mxcl\/homebrew/
|
||||
safe_system "git remote set-url origin https://github.com/Homebrew/homebrew.git"
|
||||
safe_system "git remote set-url --delete origin .*mxcl\/homebrew.*"
|
||||
safe_system "git", "remote", "set-url", "origin", "https://github.com/Homebrew/homebrew.git"
|
||||
safe_system "git", "remote", "set-url", "--delete", "origin", ".*mxcl\/homebrew.*"
|
||||
end
|
||||
rescue Exception
|
||||
FileUtils.rm_rf ".git"
|
||||
@ -138,12 +138,12 @@ class Updater
|
||||
attr_reader :initial_revision, :current_revision
|
||||
|
||||
def pull!
|
||||
safe_system "git checkout -q master"
|
||||
safe_system "git", "checkout", "-q", "master"
|
||||
|
||||
@initial_revision = read_current_revision
|
||||
|
||||
# ensure we don't munge line endings on checkout
|
||||
safe_system "git config core.autocrlf false"
|
||||
safe_system "git", "config", "core.autocrlf", "false"
|
||||
|
||||
args = ["pull"]
|
||||
args << "--rebase" if ARGV.include? "--rebase"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user