diff options
author | Thibault Jouan <tj@a13.fr> | 2013-08-22 14:38:59 +0000 |
---|---|---|
committer | Thibault Jouan <tj@a13.fr> | 2013-08-27 18:38:11 +0000 |
commit | 1cb50949035d850a85ad0c9d0b6bd424af83a01a (patch) | |
tree | e2849eca82fd24cc5adcfb02710fddd5d3aee23c /railties/lib | |
parent | 974335d4d0635bab660413b4533d8f6c5eb1aac0 (diff) | |
download | rails-1cb50949035d850a85ad0c9d0b6bd424af83a01a.tar.gz rails-1cb50949035d850a85ad0c9d0b6bd424af83a01a.tar.bz2 rails-1cb50949035d850a85ad0c9d0b6bd424af83a01a.zip |
Comply with current umask when generating new app:
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.
Diffstat (limited to 'railties/lib')
-rw-r--r-- | railties/lib/rails/generators/rails/app/app_generator.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/railties/lib/rails/generators/rails/app/app_generator.rb b/railties/lib/rails/generators/rails/app/app_generator.rb index 9fb8ea6955..041bfcb733 100644 --- a/railties/lib/rails/generators/rails/app/app_generator.rb +++ b/railties/lib/rails/generators/rails/app/app_generator.rb @@ -68,7 +68,7 @@ module Rails directory "bin" do |content| "#{shebang}\n" + content end - chmod "bin", 0755, verbose: false + chmod "bin", 0755 & ~File.umask, verbose: false end def config |