mirror of
https://github.com/ninxsoft/Mist.git
synced 2025-05-24 03:57:13 -04:00
Improve logging of failed commands
This commit is contained in:
parent
649ed12358
commit
02a74e59e3
17 changed files with 44 additions and 36 deletions
|
@ -47,10 +47,10 @@ struct PackageCreator {
|
|||
private static func create(_ url: URL, with arguments: [String]) async throws {
|
||||
|
||||
try await DirectoryRemover.remove(url)
|
||||
let result: (terminationStatus: Int32, standardOutput: String?, standardError: String?) = try ShellExecutor.shared.execute(arguments)
|
||||
let response: HelperToolCommandResponse = try ShellExecutor.shared.execute(arguments)
|
||||
|
||||
guard result.terminationStatus == 0 else {
|
||||
throw MistError.invalidTerminationStatus(status: result.terminationStatus, string: result.standardError)
|
||||
guard response.terminationStatus == 0 else {
|
||||
throw MistError.invalidTerminationStatus(status: response.terminationStatus, output: response.standardOutput, error: response.standardError)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue