From fb99e60ca96609e46ff9499c015864da14de7e49 Mon Sep 17 00:00:00 2001 From: Yossef Mendelssohn Date: Sun, 25 Aug 2013 12:55:43 -0400 Subject: [PATCH 1/3] add more args to turn off pulling --- script/boxen | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/script/boxen b/script/boxen index e856a7a..391212a 100755 --- a/script/boxen +++ b/script/boxen @@ -25,8 +25,8 @@ Dir.chdir Pathname.new(__FILE__).realpath + "../.." # Auto-update code. This is done as early as possible so that changes # to boxen support code or dependencies can be grabbed. - -unless ENV["BOXEN_NO_PULL"] || ARGV.include?("--no-pull") +NO_PULL_ARGS = %w[--no-pull -h -? --help] +unless ENV["BOXEN_NO_PULL"] || NO_PULL_ARGS.any? { |arg| ARGV.include?(arg) } quietly = "> /dev/null 2>&1" if system("which git > /dev/null") && File.directory?(".git") \ From 15e1b5990fe902f935508e5b22d7212816ba8103 Mon Sep 17 00:00:00 2001 From: Yossef Mendelssohn Date: Sun, 25 Aug 2013 12:59:03 -0400 Subject: [PATCH 2/3] switch around the no-pull arg check --- script/boxen | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/script/boxen b/script/boxen index 391212a..5c11401 100755 --- a/script/boxen +++ b/script/boxen @@ -26,7 +26,8 @@ Dir.chdir Pathname.new(__FILE__).realpath + "../.." # Auto-update code. This is done as early as possible so that changes # to boxen support code or dependencies can be grabbed. NO_PULL_ARGS = %w[--no-pull -h -? --help] -unless ENV["BOXEN_NO_PULL"] || NO_PULL_ARGS.any? { |arg| ARGV.include?(arg) } +unless ENV["BOXEN_NO_PULL"] || + ARGV.any? { |arg| NO_PULL_ARGS.include?(arg) } quietly = "> /dev/null 2>&1" if system("which git > /dev/null") && File.directory?(".git") \ From 4a946c2b861b9c8021d5c59bed6d6a01ca56224c Mon Sep 17 00:00:00 2001 From: Yossef Mendelssohn Date: Sun, 25 Aug 2013 13:00:17 -0400 Subject: [PATCH 3/3] also turn off pulling for service manipulation --- script/boxen | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/script/boxen b/script/boxen index 5c11401..479dd0a 100755 --- a/script/boxen +++ b/script/boxen @@ -25,9 +25,9 @@ Dir.chdir Pathname.new(__FILE__).realpath + "../.." # Auto-update code. This is done as early as possible so that changes # to boxen support code or dependencies can be grabbed. -NO_PULL_ARGS = %w[--no-pull -h -? --help] +NO_PULL_ARGS = %w[--no-pull -h -? --help] + [/-service/] unless ENV["BOXEN_NO_PULL"] || - ARGV.any? { |arg| NO_PULL_ARGS.include?(arg) } + ARGV.any? { |arg| NO_PULL_ARGS.any? { |no| arg.match(no) } } quietly = "> /dev/null 2>&1" if system("which git > /dev/null") && File.directory?(".git") \