Fix error handling

Signed-off-by: Tim Etchells <tetchell@redhat.com>
This commit is contained in:
Tim Etchells 2020-11-23 17:08:21 -05:00
parent 54d567b235
commit a65863e0db
6 changed files with 51 additions and 66 deletions

View file

@ -1,11 +1,5 @@
export interface CommandSucceeeded {
readonly succeeded: true;
readonly output?: string;
}
export interface CommandFailed {
readonly succeeded: false;
readonly reason?: string;
}
export type CommandResult = CommandFailed | CommandSucceeeded;
type CommandResult = {
exitCode: number
output: string
error: string
};