diff options
author | Andre Arko <andre@arko.net> | 2015-10-04 16:17:16 -0700 |
---|---|---|
committer | Andre Arko <andre@arko.net> | 2015-10-05 12:44:57 -0700 |
commit | cea53edb643d458ff44a739444f997dd7c24623a (patch) | |
tree | 372b0289ce7caa203320dbb9c95af5fbbeb36595 | |
parent | 59529ead038e2f27ae91d63716eba80e8fa18e0f (diff) | |
download | bundler-1-10-stable.tar.gz |
de-escalate root warning1-10-stable
-rw-r--r-- | lib/bundler/cli/install.rb | 5 | ||||
-rw-r--r-- | spec/install/gems/sudo_spec.rb | 2 |
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 |