Skip to content

Commit

Permalink
Fix crash
Browse files Browse the repository at this point in the history
_fixes #671
  • Loading branch information
nikitabobko committed Jan 11, 2025
1 parent f43ee3d commit a0e08e8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
3 changes: 1 addition & 2 deletions Sources/AppBundle/command/impl/ExecAndForgetCommand.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ struct ExecAndForgetCommand: Command {
process.environment = config.execConfig.envVariables
process.executableURL = URL(filePath: "/bin/bash")
process.arguments = ["-c", args.bashScript]
Result { try process.run() }.getOrThrow()
return true
return Result { try process.run() }.isSuccess
}
}
7 changes: 7 additions & 0 deletions Sources/Common/util/ResultEx.swift
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,13 @@ public extension Result {
case .failure(let f): f
}
}

var isSuccess: Bool {
switch self {
case .success: true
case .failure: false
}
}
}

public extension Result {
Expand Down

0 comments on commit a0e08e8

Please sign in to comment.