summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlya Vassilevsky <vassilevsky@gmail.com>2016-01-21 17:30:37 +0300
committerIlya Vassilevsky <vassilevsky@gmail.com>2016-01-21 17:30:37 +0300
commitd2951bae694f6f151af4a30c36a7e069bff44bc9 (patch)
treeec28a8cb2dd7093796e6292aa51f60e3046b573e
parent3f878e3b273e4f7770a635bbcb4ba78821dc632a (diff)
downloadbundler-d2951bae694f6f151af4a30c36a7e069bff44bc9.tar.gz
Booleanize the disable_shared_gems option
-rw-r--r--lib/bundler/cli/check.rb4
-rw-r--r--lib/bundler/cli/install.rb2
2 files changed, 4 insertions, 2 deletions
diff --git a/lib/bundler/cli/check.rb b/lib/bundler/cli/check.rb
index 75a49dc5ad..fd09425e4a 100644
--- a/lib/bundler/cli/check.rb
+++ b/lib/bundler/cli/check.rb
@@ -1,6 +1,7 @@
module Bundler
class CLI::Check
attr_reader :options
+
def initialize(options)
@options = options
end
@@ -8,8 +9,9 @@ module Bundler
def run
if options[:path]
Bundler.settings[:path] = File.expand_path(options[:path])
- Bundler.settings[:disable_shared_gems] = "1"
+ Bundler.settings[:disable_shared_gems] = true
end
+
begin
definition = Bundler.definition
definition.validate_ruby!
diff --git a/lib/bundler/cli/install.rb b/lib/bundler/cli/install.rb
index df3472d70a..8478570ad9 100644
--- a/lib/bundler/cli/install.rb
+++ b/lib/bundler/cli/install.rb
@@ -94,7 +94,7 @@ module Bundler
Bundler.settings.without = options[:without]
Bundler.settings.with = options[:with]
Bundler::Fetcher.disable_endpoint = options["full-index"]
- Bundler.settings[:disable_shared_gems] = Bundler.settings[:path] ? "1" : nil
+ Bundler.settings[:disable_shared_gems] = !!Bundler.settings[:path]
# rubygems plugins sometimes hook into the gem install process
Gem.load_env_plugins if Gem.respond_to?(:load_env_plugins)