We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2bf7563 commit 2c47351Copy full SHA for 2c47351
lib/executable-hooks/regenerate_binstubs_command.rb
@@ -65,11 +65,14 @@ def try_to_fix_binstubs(spec)
65
end
66
return false if executable_shebangs.detect{|path, lines| !lines[0] =~ /^#!\// }
67
puts "#{spec.name} #{spec.version}"
68
+ executable_mode = 0111
69
executable_shebangs.map do |path, lines|
70
lines[0] = "#!#{ExecutableHooksInstaller.env_path} #{ExecutableHooks::Wrapper.expanded_wrapper_name}"
71
File.open(path, "w") do |file|
72
file.puts(lines)
73
74
+ mode = File.stat(path).mode
75
+ File.chmod(mode | executable_mode, path) if mode & executable_mode != executable_mode
76
77
78
0 commit comments