diff --git a/.changeset/shiny-knives-accept.md b/.changeset/shiny-knives-accept.md new file mode 100644 index 0000000..ab6ac7f --- /dev/null +++ b/.changeset/shiny-knives-accept.md @@ -0,0 +1,5 @@ +--- +'farmup': patch +--- + +Optimize the situation when code is null diff --git a/README.md b/README.md index ad5c3b8..4d9e2d6 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@

-Farm +Farmup

easy run your TypeScript、JavaScript or html

diff --git a/src/config/constant.ts b/src/config/constant.ts index f76fb88..172ac96 100644 --- a/src/config/constant.ts +++ b/src/config/constant.ts @@ -1,6 +1,6 @@ import { Logger } from "@farmfe/core"; -export const CLI_NAME = 'farmup'; +export const CLI_NAME = 'Farmup'; export const logger = new Logger({ name: CLI_NAME, diff --git a/src/core/executer.ts b/src/core/executer.ts index 76c6c22..1131f50 100644 --- a/src/core/executer.ts +++ b/src/core/executer.ts @@ -11,7 +11,7 @@ export class Executer { public option: ExecuteOption, public logger: Logger, public normalizedOption: ResolvedCommonOptions, - ) {} + ) { } execute(path: string, name: string, logger = this.logger) { switch (this.option.type) { @@ -50,7 +50,7 @@ export class Executer { process.on('exit', this.closeChild); child.on('exit', (code) => { - this.logger.info(`"${name}" PID ${child.pid} ${code === 0 ? 'done' : `exit ${code}`}`); + this.logger.info(`"${name}" PID ${child.pid} ${!code ? 'done' : `exit ${code}`}`); this.child = undefined; }); }