Skip to content

Commit dadc0a1

Browse files
authored
fix: use bun instead of bunx to run scripts. [⚠️ Potentially dangerous] (#174)
fix: use bun instead of bunx to run scripts `bunx` is an alias for `bun x`, to execute binaries
1 parent f31b0b9 commit dadc0a1

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/cta-engine/src/package-manager.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export function getPackageManagerScriptCommand(
3434
case 'pnpm':
3535
return { command: 'pnpm', args: [...args] }
3636
case 'bun':
37-
return { command: 'bunx', args: ['--bun', 'run', ...args] }
37+
return { command: 'bun', args: ['--bun', 'run', ...args] }
3838
case 'deno':
3939
return { command: 'deno', args: ['task', ...args] }
4040
default:

packages/cta-engine/tests/package-manager.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ describe('getPackageManagerScriptCommand', () => {
2020
})
2121
it('bun', () => {
2222
expect(formatCommand(getPackageManagerScriptCommand('bun', ['dev']))).toBe(
23-
'bunx --bun run dev',
23+
'bun --bun run dev',
2424
)
2525
})
2626
it('deno', () => {

0 commit comments

Comments
 (0)