Skip to content

Commit

Permalink
fix: bun support
Browse files Browse the repository at this point in the history
  • Loading branch information
exKAZUu committed May 15, 2024
1 parent 1fc92bd commit c972063
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/commands/run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export const run: CommandModule<unknown, InferredOptionTypes<typeof builder>> =

const isRunningOnBun = process.argv[0].endsWith('/bun');
const runtime = isRunningOnBun ? 'bun' : 'node';
const args = isRunningOnBun ? [] : ['--no-warnings', '--import', 'tsx', file];
const args = isRunningOnBun ? ['--bun', file] : ['--no-warnings', '--import', 'tsx', file];
if (argv.watch) {
args.push('--watch');
}
Expand All @@ -41,7 +41,7 @@ export const run: CommandModule<unknown, InferredOptionTypes<typeof builder>> =
}
const ret = child_process.spawnSync(runtime, runtimeArgs, {
stdio: 'inherit',
env: { ...process.env, NODE_NO_WARNINGS: '1' },
env: { ...process.env },
});
process.exit(ret.status ?? 1);
},
Expand Down

0 comments on commit c972063

Please sign in to comment.