fix(mac): keep pnpm health output json-safe
This commit is contained in:
@@ -99,10 +99,13 @@ final class HealthStore: ObservableObject {
|
||||
return
|
||||
}
|
||||
|
||||
var env = ProcessInfo.processInfo.environment
|
||||
env["PATH"] = CommandResolver.preferredPaths().joined(separator: ":")
|
||||
|
||||
let response = await ShellRunner.run(
|
||||
command: CommandResolver.clawdisCommand(subcommand: "health", extraArgs: ["--json"]),
|
||||
cwd: nil,
|
||||
env: nil,
|
||||
cwd: CommandResolver.projectRootPath(),
|
||||
env: env,
|
||||
timeout: 15)
|
||||
|
||||
guard response.ok, let data = response.payload, !data.isEmpty else {
|
||||
|
||||
@@ -250,7 +250,8 @@ enum CommandResolver {
|
||||
}
|
||||
}
|
||||
if let pnpm = self.findExecutable(named: "pnpm") {
|
||||
return [pnpm, "clawdis", subcommand] + extraArgs
|
||||
// Use --silent to avoid pnpm lifecycle banners that would corrupt JSON outputs.
|
||||
return [pnpm, "--silent", "clawdis", subcommand] + extraArgs
|
||||
}
|
||||
return ["clawdis", subcommand] + extraArgs
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user