Process class implemented, not tested, all green for now, need to reevaluate the test-suite and write tests for new code and changed one
This commit is contained in:
+1
-1
@@ -8,7 +8,7 @@ export type CommandFn = (
|
||||
state: ShellState,
|
||||
flags: string[],
|
||||
args: string[],
|
||||
) => CommandOutput<ShellError>;
|
||||
) => Promise<CommandOutput<ShellError>>;
|
||||
|
||||
export interface CommandDescriptor {
|
||||
fn: CommandFn;
|
||||
|
||||
@@ -18,7 +18,7 @@ export function createShellError<E extends ShellError>(
|
||||
let exitCode = EXIT_CODE_MAP[errorType] ?? 1;
|
||||
|
||||
// Special handling for signal termination
|
||||
if (errorType === "SIGNAL_TERMINATION") {
|
||||
if (errorType === "SignalTermination") {
|
||||
const signalError = extraProps as unknown as { signalNumber: number };
|
||||
exitCode = 128 + signalError.signalNumber;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user