Skip to content

Commit f362ecc

Browse files
committed
Fix for bun injecting /$bunfs when you prompt codebuff with command line arg
1 parent 02b4826 commit f362ecc

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

npm-app/src/index.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,8 +189,9 @@ For all commands and options, run 'codebuff' and then type 'help'.
189189
}
190190
}
191191

192-
// Get initial input
193-
const initialInput = args.join(' ')
192+
// Remove the first argument if it's the compiled binary path which bun weirdly injects (starts with /$bunfs)
193+
const filteredArgs = args[0]?.startsWith('/$bunfs') ? args.slice(1) : args
194+
const initialInput = filteredArgs.join(' ')
194195

195196
codebuff({
196197
initialInput,

0 commit comments

Comments
 (0)