summaryrefslogtreecommitdiff
path: root/lib/bundler/cli/gem.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/bundler/cli/gem.rb')
-rw-r--r--lib/bundler/cli/gem.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/bundler/cli/gem.rb b/lib/bundler/cli/gem.rb
index add19ff3d7..e74f013a47 100644
--- a/lib/bundler/cli/gem.rb
+++ b/lib/bundler/cli/gem.rb
@@ -111,7 +111,9 @@ module Bundler
end
executables.each do |path|
- FileUtils.chmod "+x", target.join(path).to_s
+ path = target.join(path).to_s
+ mode = File.stat(path).mode | 0111
+ FileUtils.chmod mode, path
end
Bundler.ui.info "Initializing git repo in #{target}"