Commit 1ce76f34 authored by Samuel E. Giddins's avatar Samuel E. Giddins

Merge pull request #3900 from CocoaPods/seg-delay-locking

[Installer] Delay source file locking
parents 99394b25 8f15a9bc
...@@ -23,6 +23,11 @@ To install release candidates run `[sudo] gem install cocoapods --pre` ...@@ -23,6 +23,11 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
[#3889](https://github.com/CocoaPods/CocoaPods/issues/3889) [#3889](https://github.com/CocoaPods/CocoaPods/issues/3889)
[#3884](https://github.com/CocoaPods/CocoaPods/issues/3884) [#3884](https://github.com/CocoaPods/CocoaPods/issues/3884)
* Source file locking now happens after plugin and podfile post-install hooks
have run.
[Samuel Giddins](https://github.com/segiddins)
[#3529](https://github.com/CocoaPods/CocoaPods/issues/3529)
## 0.38.1 ## 0.38.1
......
require 'active_support/core_ext/string/inflections' require 'active_support/core_ext/string/inflections'
require 'fileutils'
module Pod module Pod
# The Installer is responsible of taking a Podfile and transform it in the # The Installer is responsible of taking a Podfile and transform it in the
...@@ -113,6 +114,7 @@ module Pod ...@@ -113,6 +114,7 @@ module Pod
def prepare def prepare
UI.message 'Preparing' do UI.message 'Preparing' do
FileUtils.chmod_R('+w', sandbox.root)
sandbox.prepare sandbox.prepare
ensure_plugins_are_installed! ensure_plugins_are_installed!
Migrator.migrate(sandbox) Migrator.migrate(sandbox)
...@@ -141,7 +143,6 @@ module Pod ...@@ -141,7 +143,6 @@ module Pod
install_pod_sources install_pod_sources
run_podfile_pre_install_hooks run_podfile_pre_install_hooks
clean_pod_sources clean_pod_sources
lock_pod_sources
end end
end end
...@@ -442,6 +443,7 @@ module Pod ...@@ -442,6 +443,7 @@ module Pod
def perform_post_install_actions def perform_post_install_actions
run_plugins_post_install_hooks run_plugins_post_install_hooks
warn_for_deprecations warn_for_deprecations
lock_pod_sources
end end
# Runs the registered callbacks for the plugins post install hooks. # Runs the registered callbacks for the plugins post install hooks.
......
...@@ -78,8 +78,7 @@ module Pod ...@@ -78,8 +78,7 @@ module Pod
file_accessors.each do |file_accessor| file_accessors.each do |file_accessor|
file_accessor.source_files.each do |source_file| file_accessor.source_files.each do |source_file|
next unless source_file.exist? next unless source_file.exist?
new_permissions = source_file.stat.mode & ~0222 FileUtils.chmod('-w', source_file)
source_file.chmod(new_permissions)
end end
end end
end end
......
Subproject commit 26bb687a87734a7b431074d2aca8b1a8c2f62c8c Subproject commit 6e68269b557236f9bd5afa3bc41b0f05d7d224ba
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