Skip to content

Commit

Permalink
Ignore thrown exception when running extractedString
Browse files Browse the repository at this point in the history
Replacing NSLocalizedString with CFLocalizedString results in having a
thrown error, even though it still successfully builds. Better to just
ignore the exception entirely. Based on the GitHub discussion in the
following: FlineDev#135
  • Loading branch information
acosmicflamingo committed Mar 6, 2021
1 parent 1fc6ec3 commit 0d87ce0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Sources/BartyCrouchKit/OldCommandLine/CodeCommander.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@ public final class CodeCommander {
fromCodeInDirectoryPath codeDirectoryPath: String,
customFunction: String?,
usePlistArguments: Bool
) throws {
) {
let files = try findFiles(in: codeDirectoryPath)
let customFunctionArgs = customFunction != nil ? ["-s", "\(customFunction!)"] : []

let argumentsWithoutTheFiles = ["extractLocStrings"] + ["-o", stringsFilePath] + customFunctionArgs + ["-q"]

let arguments = try appendFiles(files, inListOfArguments: argumentsWithoutTheFiles, usePlistArguments: usePlistArguments)
try Task.run("/usr/bin/xcrun", arguments: arguments)
try? Task.run("/usr/bin/xcrun", arguments: arguments)
}

func findFiles(in codeDirectoryPath: String) throws -> [String] {
Expand Down

0 comments on commit 0d87ce0

Please sign in to comment.