summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndre Arko <andre@arko.net>2015-10-04 16:17:16 -0700
committerAndre Arko <andre@arko.net>2015-10-05 12:44:57 -0700
commitcea53edb643d458ff44a739444f997dd7c24623a (patch)
tree372b0289ce7caa203320dbb9c95af5fbbeb36595
parent59529ead038e2f27ae91d63716eba80e8fa18e0f (diff)
downloadbundler-1-10-stable.tar.gz
de-escalate root warning1-10-stable
-rw-r--r--lib/bundler/cli/install.rb5
-rw-r--r--spec/install/gems/sudo_spec.rb2
2 files changed, 3 insertions, 4 deletions
diff --git a/lib/bundler/cli/install.rb b/lib/bundler/cli/install.rb
index 445040e1ea..a83fdf5860 100644
--- a/lib/bundler/cli/install.rb
+++ b/lib/bundler/cli/install.rb
@@ -158,9 +158,8 @@ module Bundler
def warn_if_root
return if Bundler::WINDOWS || !Process.uid.zero?
- Bundler.ui.warn "Don't run Bundler as root. Bundler can ask for sudo " \
- "if it is needed, and installing your bundle as root will break this " \
- "application for all non-root users on this machine.", :wrap => true
+ Bundler.ui.warn "You're installing this bundle as root. That means " \
+ "you must also run your application as root.", :wrap => true
end
def confirm_without_groups
diff --git a/spec/install/gems/sudo_spec.rb b/spec/install/gems/sudo_spec.rb
index 3e833960e2..e8145161b7 100644
--- a/spec/install/gems/sudo_spec.rb
+++ b/spec/install/gems/sudo_spec.rb
@@ -147,7 +147,7 @@ describe "when using sudo", :sudo => true do
it "warns against that" do
gemfile %|source "file://#{gem_repo1}"|
bundle :install, :sudo => true
- expect(out).to include("Don't run Bundler as root.")
+ expect(out.gsub("\n", " ")).to include("you must also run your application as root")
end
end