summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel E. Giddins <segiddins@segiddins.me>2015-03-27 21:09:51 -0700
committerSamuel E. Giddins <segiddins@segiddins.me>2015-03-27 21:09:51 -0700
commita6dcd57e19c88004e4c9e24a7716288f1a89e351 (patch)
treed91ec8c812dfec03ea358e1fac58f45f13e214df
parent1b646f2f7601bde67b1e8fd42d0e81cfa8bb85a3 (diff)
downloadbundler-seg-1.8-chmod.tar.gz
[Gem] Fix making executables executable on 1.8seg-1.8-chmod
-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}"