Skip to content

Commit

Permalink
Attempt to remove invalid archs by intersecting VALID_ARCHS and ARCHS (
Browse files Browse the repository at this point in the history
  • Loading branch information
jerbob92 committed Sep 16, 2020
1 parent 80b3cfa commit 0d324cb
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions Source/carthage/CopyFrameworks.swift
Expand Up @@ -165,9 +165,23 @@ private func frameworksFolder() -> Result<URL, CarthageError> {
}

private func validArchitectures() -> Result<[String], CarthageError> {
return getEnvironmentVariable("VALID_ARCHS").map { architectures -> [String] in
return architectures.components(separatedBy: " ")
}
let validArchs = getEnvironmentVariable("VALID_ARCHS").map { architectures -> [String] in
return architectures.components(separatedBy: " ")
}

if validArchs.error != nil {
return validArchs
}

let archs = getEnvironmentVariable("ARCHS").map { architectures -> [String] in
return architectures.components(separatedBy: " ")
}

if archs.error != nil {
return archs
}

return .success(validArchs.value!.filter(archs.value!.contains))
}

private func buildActionIsArchiveOrInstall() -> Bool {
Expand Down

0 comments on commit 0d324cb

Please sign in to comment.