Skip to content

Commit

Permalink
Comply with current umask when generating new app:
Browse files Browse the repository at this point in the history
  When creating a new application using the default rails generator
(`rails new my_app`), it will apply some permissions bypassing the
current process umask. The `bin' directory and any files inside it will
always be set a mode of 0755.

  This change removes the current umask bits from the mode applied by
the generator on the `bin' directory and its content.
  • Loading branch information
Thibault Jouan committed Aug 27, 2013
1 parent 974335d commit 1cb5094
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion railties/lib/rails/generators/rails/app/app_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def bin
directory "bin" do |content|
"#{shebang}\n" + content
end
chmod "bin", 0755, verbose: false
chmod "bin", 0755 & ~File.umask, verbose: false
end

def config
Expand Down

0 comments on commit 1cb5094

Please sign in to comment.