Skip to content

Commit

Permalink
Bun runs package.json#scripts if the command is not built-in
Browse files Browse the repository at this point in the history
  • Loading branch information
webpro committed Apr 22, 2024
1 parent 927ea7c commit e6b21e6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/knip/src/binaries/resolvers/bun.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export const resolve: Resolver = (_binary, args, { manifestScriptNames, cwd, fro
const parsed = parseArgs(args);
const [command, script] = parsed._;
if (command === 'run' && manifestScriptNames.has(script)) return [];
if (commands.includes(command)) return [];
if (manifestScriptNames.has(command) || commands.includes(command)) return [];
const filePath = command === 'run' ? script : command;
const specifier = tryResolveFilePath(cwd, filePath);
if (specifier) return [specifier];
Expand Down

0 comments on commit e6b21e6

Please sign in to comment.