Skip to content

Commit

Permalink
Merge pull request #17 from ErKeLost/node/null
Browse files Browse the repository at this point in the history
chore: Optimize the situation when code is null
  • Loading branch information
ErKeLost authored May 27, 2024
2 parents 7a1cfba + 0c0668f commit 219fceb
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .changeset/shiny-knives-accept.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'farmup': patch
---

Optimize the situation when code is null
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<h1 align="center">
Farm
Farmup
</h1>

<p align="center">easy run your TypeScript、JavaScript or html</p>
Expand Down
2 changes: 1 addition & 1 deletion src/config/constant.ts
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
4 changes: 2 additions & 2 deletions src/core/executer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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;
});
}
Expand Down

0 comments on commit 219fceb

Please sign in to comment.