diff options
author | Andre Arko <andre@arko.net> | 2015-03-27 21:22:07 -0700 |
---|---|---|
committer | Andre Arko <andre@arko.net> | 2015-03-27 21:22:07 -0700 |
commit | 152c69fc5cd6fe80582e8e2603bcc352799579ec (patch) | |
tree | 4da0a97f362b105d55fe86840c9e9bb26cae519a /lib | |
parent | 1b646f2f7601bde67b1e8fd42d0e81cfa8bb85a3 (diff) | |
download | bundler-152c69fc5cd6fe80582e8e2603bcc352799579ec.tar.gz |
turns out Ruby 1.8 can’t handle chmod strings
Diffstat (limited to 'lib')
-rw-r--r-- | lib/bundler/cli/gem.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/bundler/cli/gem.rb b/lib/bundler/cli/gem.rb index add19ff3..e27b2a3e 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}" |