Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
cocoapods
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gengmeiios
cocoapods
Commits
fdfcf455
Commit
fdfcf455
authored
Jul 24, 2015
by
Samuel E. Giddins
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Installer] Make pod source locking robust against prefixed target names
parent
73757064
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
12 deletions
+7
-12
installer.rb
lib/cocoapods/installer.rb
+1
-1
pod_source_installer.rb
lib/cocoapods/installer/pod_source_installer.rb
+6
-11
No files found.
lib/cocoapods/installer.rb
View file @
fdfcf455
...
@@ -347,7 +347,7 @@ module Pod
...
@@ -347,7 +347,7 @@ module Pod
return
unless
config
.
lock_pod_source?
return
unless
config
.
lock_pod_source?
return
unless
@pod_installers
return
unless
@pod_installers
@pod_installers
.
each
do
|
installer
|
@pod_installers
.
each
do
|
installer
|
pod_target
=
pod_targets
.
detect
{
|
target
|
target
.
name
==
installer
.
name
}
pod_target
=
pod_targets
.
find
{
|
target
|
target
.
pod_name
==
installer
.
name
}
installer
.
lock_files!
(
pod_target
.
file_accessors
)
installer
.
lock_files!
(
pod_target
.
file_accessors
)
end
end
end
end
...
...
lib/cocoapods/installer/pod_source_installer.rb
View file @
fdfcf455
...
@@ -33,7 +33,8 @@ module Pod
...
@@ -33,7 +33,8 @@ module Pod
"<
#{
self
.
class
}
sandbox=
#{
sandbox
.
root
}
pod=
#{
root_spec
.
name
}
"
"<
#{
self
.
class
}
sandbox=
#{
sandbox
.
root
}
pod=
#{
root_spec
.
name
}
"
end
end
# @return [String] The name of the pod this is installing
# @return [String] The name of the pod this installer is installing.
#
def
name
def
name
root_spec
.
name
root_spec
.
name
end
end
...
@@ -72,19 +73,13 @@ module Pod
...
@@ -72,19 +73,13 @@ module Pod
# @return [void]
# @return [void]
#
#
def
lock_files!
(
file_accessors
)
def
lock_files!
(
file_accessors
)
if
local?
return
if
local?
return
end
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
|
if
File
.
exist?
(
source_file
)
next
unless
source_file
.
exist?
file
=
source_file
.
open
new_permissions
=
source_file
.
stat
.
mode
&
~
0222
# Only remove write permission, since some pods (like Crashlytics)
source_file
.
chmod
(
new_permissions
)
# have executable files.
new_permissions
=
File
.
stat
(
file
).
mode
&
~
0222
File
.
chmod
(
new_permissions
,
file
)
end
end
end
end
end
end
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment