Skip to content

Commit

Permalink
fix: check if interactive before attaching key commands
Browse files Browse the repository at this point in the history
  • Loading branch information
rigor789 committed Oct 9, 2023
1 parent bfda34c commit 27d3940
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
10 changes: 6 additions & 4 deletions lib/commands/run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,12 @@ export class RunCommandBase implements ICommand {
this.liveSyncCommandHelperAdditionalOptions
);

this.$keyCommandHelper.attachKeyCommands(
this.platform as IKeyCommandPlatform,
"run"
);
if (process.env.NS_IS_INTERACTIVE) {
this.$keyCommandHelper.attachKeyCommands(
this.platform as IKeyCommandPlatform,
"run"
);
}
}

public async canExecute(args: string[]): Promise<boolean> {
Expand Down
1 change: 1 addition & 0 deletions lib/services/start-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ export default class StartService implements IStartService {
env: {
FORCE_COLOR: 1,
HIDE_HEADER: true,
NS_IS_INTERACTIVE: true,
...process.env,
},
}
Expand Down

0 comments on commit 27d3940

Please sign in to comment.