Merge pull request #922 from mpretty-cyro/fix/string-linter-for-archives
Fixed an issue where string validation was failing on archive builds
This commit is contained in:
commit
c81616c145
|
@ -104,8 +104,19 @@ enum ScriptAction: String {
|
|||
guard
|
||||
let builtProductsPath: String = ProcessInfo.processInfo.environment["BUILT_PRODUCTS_DIR"],
|
||||
let productName: String = ProcessInfo.processInfo.environment["FULL_PRODUCT_NAME"],
|
||||
let productPathInfo = try? URL(fileURLWithPath: "\(builtProductsPath)/\(productName)")
|
||||
.resourceValues(forKeys: [.isSymbolicLinkKey, .isAliasFileKey]),
|
||||
let finalProductUrl: URL = try? { () -> URL in
|
||||
let possibleAliasUrl: URL = URL(fileURLWithPath: "\(builtProductsPath)/\(productName)")
|
||||
|
||||
guard productPathInfo.isSymbolicLink == true || productPathInfo.isAliasFile == true else {
|
||||
return possibleAliasUrl
|
||||
}
|
||||
|
||||
return try URL(resolvingAliasFileAt: possibleAliasUrl, options: URL.BookmarkResolutionOptions())
|
||||
}(),
|
||||
let enumerator: FileManager.DirectoryEnumerator = FileManager.default.enumerator(
|
||||
at: URL(fileURLWithPath: "\(builtProductsPath)/\(productName)"),
|
||||
at: finalProductUrl,
|
||||
includingPropertiesForKeys: [.isDirectoryKey],
|
||||
options: [.skipsHiddenFiles]
|
||||
),
|
||||
|
|
Loading…
Reference in New Issue