mirror of
https://github.com/zhigang1992/CocoaPods.git
synced 2026-04-30 10:22:26 +08:00
[UserProjectIntegrator] Don't by affected by the order of projects in the workspace.
This commit is contained in:
@@ -78,13 +78,13 @@ module Pod
|
||||
# @return [void]
|
||||
#
|
||||
def create_workspace
|
||||
projpaths = [sandbox.project_path, *user_project_paths].map do |path|
|
||||
projpaths = [*user_project_paths, sandbox.project_path].map do |path|
|
||||
path.relative_path_from(workspace_path.dirname).to_s
|
||||
end.uniq
|
||||
|
||||
if workspace_path.exist?
|
||||
current_workspace = Xcodeproj::Workspace.new_from_xcworkspace(workspace_path)
|
||||
if current_workspace.projpaths != projpaths
|
||||
if current_workspace.projpaths.sort != projpaths.sort
|
||||
workspace = Xcodeproj::Workspace.new(*projpaths)
|
||||
workspace.save_as(workspace_path)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user