summaryrefslogtreecommitdiff
path: root/lib/bundler/cli
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2019-07-24 12:24:55 +0200
committerSHIBATA Hiroshi <hsbt@ruby-lang.org>2019-08-16 14:30:23 +0900
commitb587e8c7f1cd56f1c53156d7893ee0e581128a0a (patch)
tree57abd1230e6f723e0dc938718ca9ded360786d55 /lib/bundler/cli
parentcb71930351f8978d3c0b06acc14c98a8978f3abe (diff)
[bundler/bundler] Add `--[no-]git` option to `bundle gem`
I think using `--no-git` can be useful when creating gems inside monorepos. https://github.com/bundler/bundler/commit/154c687310
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/2366
Diffstat (limited to 'lib/bundler/cli')
-rw-r--r--lib/bundler/cli/gem.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/bundler/cli/gem.rb b/lib/bundler/cli/gem.rb
index 3db1ec7843..5ae9ca4af8 100644
--- a/lib/bundler/cli/gem.rb
+++ b/lib/bundler/cli/gem.rb
@@ -148,7 +148,7 @@ module Bundler
end
end
- if Bundler.git_present?
+ if Bundler.git_present? && options[:git]
Bundler.ui.info "Initializing git repo in #{target}"
Dir.chdir(target) do
`git init`