Skip to content

Commit 421820f

Browse files
committed
fix(cli): adjust check for internal command
1 parent b9d14e6 commit 421820f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

genkit-tools/cli/src/cli.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ export async function startCLI(): Promise<void> {
8787

8888
// When running as a spawned UI server process, argv[1] will be '__server-harness'
8989
// instead of a normal command. This allows the same binary to serve both CLI and server roles.
90-
if (process.argv[1] === SERVER_HARNESS_COMMAND) {
90+
if (process.argv[2] === SERVER_HARNESS_COMMAND) {
9191
program.addCommand(serverHarness);
9292
}
9393

genkit-tools/cli/src/commands/server-harness.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export const serverHarness = new Command('__server-harness')
4747
process.on('uncaughtException', (err, somethingelse) => {
4848
logger.error(`Uncaught error in tools process: ${err} ${somethingelse}`);
4949
});
50-
process.on('unhandledRejection', (reason, p) => {
50+
process.on('unhandledRejection', (reason, _p) => {
5151
logger.error(`Unhandled rejection in tools process: ${reason}`);
5252
});
5353

0 commit comments

Comments
 (0)