diff --git a/src/bin/main.ts b/src/bin/main.ts index 836bda9b..7ef2a9b8 100644 --- a/src/bin/main.ts +++ b/src/bin/main.ts @@ -168,12 +168,8 @@ program handler: async ({ projectDirPath }) => { const buildContext = getBuildContext({ projectDirPath }); - console.log("before callHandlerIfAny"); - callHandlerIfAny({ buildContext, commandName }); - console.log("after callHandlerIfAny"); - const { command } = await import("./eject-page"); await command({ buildContext }); diff --git a/src/bin/shared/customHandler_caller.ts b/src/bin/shared/customHandler_caller.ts index c4a49e7a..88d5a41c 100644 --- a/src/bin/shared/customHandler_caller.ts +++ b/src/bin/shared/customHandler_caller.ts @@ -8,7 +8,6 @@ import { ApiVersion } from "./customHandler"; import * as child_process from "child_process"; -import { is } from "tsafe/is"; import { dirname as pathDirname } from "path"; import * as fs from "fs"; @@ -34,16 +33,13 @@ export function callHandlerIfAny(params: { } }); } catch (error: any) { - console.log(error.message); - console.log(error.status); + const status = error.status; - assert(is(error)); - - if (error.code === NOT_IMPLEMENTED_EXIT_CODE) { + if (status === NOT_IMPLEMENTED_EXIT_CODE) { return; } - process.exit(error.code); + process.exit(status); } process.exit(0);