summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndre Arko <andre@arko.net>2015-03-27 21:22:07 -0700
committerAndre Arko <andre@arko.net>2015-03-27 21:22:07 -0700
commit152c69fc5cd6fe80582e8e2603bcc352799579ec (patch)
tree4da0a97f362b105d55fe86840c9e9bb26cae519a
parent1b646f2f7601bde67b1e8fd42d0e81cfa8bb85a3 (diff)
downloadbundler-152c69fc5cd6fe80582e8e2603bcc352799579ec.tar.gz
turns out Ruby 1.8 can’t handle chmod strings
-rw-r--r--lib/bundler/cli/gem.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/bundler/cli/gem.rb b/lib/bundler/cli/gem.rb
index add19ff3d7..e27b2a3e76 100644
--- a/lib/bundler/cli/gem.rb
+++ b/lib/bundler/cli/gem.rb
@@ -110,8 +110,10 @@ module Bundler
thor.template("newgem/#{src}", target.join(dst), config)
end
- executables.each do |path|
- FileUtils.chmod "+x", target.join(path).to_s
+ executables.each do |file|
+ path = target.join(file)
+ executable = (path.stat.mode | 0111)
+ path.chmod(executable)
end
Bundler.ui.info "Initializing git repo in #{target}"