Fix not handling correctly exit cause
This commit is contained in:
parent
8fc307bd8d
commit
c4ee6cd85c
@ -168,12 +168,8 @@ program
|
|||||||
handler: async ({ projectDirPath }) => {
|
handler: async ({ projectDirPath }) => {
|
||||||
const buildContext = getBuildContext({ projectDirPath });
|
const buildContext = getBuildContext({ projectDirPath });
|
||||||
|
|
||||||
console.log("before callHandlerIfAny");
|
|
||||||
|
|
||||||
callHandlerIfAny({ buildContext, commandName });
|
callHandlerIfAny({ buildContext, commandName });
|
||||||
|
|
||||||
console.log("after callHandlerIfAny");
|
|
||||||
|
|
||||||
const { command } = await import("./eject-page");
|
const { command } = await import("./eject-page");
|
||||||
|
|
||||||
await command({ buildContext });
|
await command({ buildContext });
|
||||||
|
@ -8,7 +8,6 @@ import {
|
|||||||
ApiVersion
|
ApiVersion
|
||||||
} from "./customHandler";
|
} from "./customHandler";
|
||||||
import * as child_process from "child_process";
|
import * as child_process from "child_process";
|
||||||
import { is } from "tsafe/is";
|
|
||||||
import { dirname as pathDirname } from "path";
|
import { dirname as pathDirname } from "path";
|
||||||
import * as fs from "fs";
|
import * as fs from "fs";
|
||||||
|
|
||||||
@ -34,16 +33,13 @@ export function callHandlerIfAny(params: {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
} catch (error: any) {
|
} catch (error: any) {
|
||||||
console.log(error.message);
|
const status = error.status;
|
||||||
console.log(error.status);
|
|
||||||
|
|
||||||
assert(is<child_process.ExecException>(error));
|
if (status === NOT_IMPLEMENTED_EXIT_CODE) {
|
||||||
|
|
||||||
if (error.code === NOT_IMPLEMENTED_EXIT_CODE) {
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
process.exit(error.code);
|
process.exit(status);
|
||||||
}
|
}
|
||||||
|
|
||||||
process.exit(0);
|
process.exit(0);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user