Fix args undefined in release builds on Linux
In release (#else) branch, args was never defined but used on line 337. Move args declaration outside the #if DEBUG block; only append -r flag in DEBUG. Automated-By: claude-sonnet-4-6
This commit is contained in:
@@ -327,13 +327,12 @@ struct CLI {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
let cmdLinArgs = CommandLine.arguments.dropFirst()
|
let cmdLinArgs = CommandLine.arguments.dropFirst()
|
||||||
|
|
||||||
|
var args: [String] = Array(cmdLinArgs)
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
var args:[String] = Array(cmdLinArgs)
|
|
||||||
args.append(contentsOf: ["-r"])
|
args.append(contentsOf: ["-r"])
|
||||||
#else
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
await Process.main(args)
|
await Process.main(args)
|
||||||
} else {
|
} else {
|
||||||
print("This only works on mac 13 and newer.")
|
print("This only works on mac 13 and newer.")
|
||||||
|
|||||||
Reference in New Issue
Block a user