aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew
diff options
context:
space:
mode:
authorJack Nagel2014-06-20 18:36:18 -0500
committerJack Nagel2014-06-20 18:37:24 -0500
commit432797e0dbd5af836c0ee03511c98b70d1f497fd (patch)
tree6cd41ee1808891f267295b0596078c611171ad8e /Library/Homebrew
parent2150e2d2a89f79f3ab58490433e91f7a36ebf150 (diff)
downloadhomebrew-432797e0dbd5af836c0ee03511c98b70d1f497fd.tar.bz2
Use multiple argument form of system
Diffstat (limited to 'Library/Homebrew')
-rw-r--r--Library/Homebrew/build.rb4
-rw-r--r--Library/Homebrew/cmd/tap.rb2
-rw-r--r--Library/Homebrew/cmd/update.rb20
3 files changed, 13 insertions, 13 deletions
diff --git a/Library/Homebrew/build.rb b/Library/Homebrew/build.rb
index f3455d124..5a320f3b8 100644
--- a/Library/Homebrew/build.rb
+++ b/Library/Homebrew/build.rb
@@ -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"
diff --git a/Library/Homebrew/cmd/tap.rb b/Library/Homebrew/cmd/tap.rb
index e3795ce6f..d13921572 100644
--- a/Library/Homebrew/cmd/tap.rb
+++ b/Library/Homebrew/cmd/tap.rb
@@ -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 }
diff --git a/Library/Homebrew/cmd/update.rb b/Library/Homebrew/cmd/update.rb
index 4322241d6..21e119d0c 100644
--- a/Library/Homebrew/cmd/update.rb
+++ b/Library/Homebrew/cmd/update.rb
@@ -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"