Commit c66e4676 authored by Mason Glidden's avatar Mason Glidden

Just remove write permissions from files, so executables are unaffected (#3501)

parent 1bf21c70
......@@ -23,6 +23,10 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
[#3501](https://github.com/CocoaPods/CocoaPods/issues/3501)
[#3515](https://github.com/cocoapods/cocoapods/issues/3515)
* Just remove write permissions from files, so executables are unaffected.
[Mason Glidden](https://github.com/mglidden)
[#3501](https://github.com/CocoaPods/CocoaPods/issues/3501)
## 0.37.0
For more details, see 📝 [CocoaPods 0.37](http://blog.cocoapods.org/CocoaPods-0.37/) on our blog.
......
......@@ -104,7 +104,10 @@ module Pod
# those permissions if you decide to delete the Pods folder.
Dir.glob(root + '**/*').each do |file|
if File.file?(file)
File.chmod(0444, file)
# Only remove write permission, since some pods (like Crashlytics)
# have executable files.
new_permissions = File.stat(file).mode & ~0222
File.chmod(new_permissions, file)
end
end
end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment