assuming that I have a habit of naming my "portable files" also with the version number - so that I can recognize their version faster than trying to figure out what their version argument is |
Replies: 2 comments
|
The Bun doesn't inspect its own executable path for this — it just looks for If you want to keep versioned copies, you could keep the original name and use a wrapper or symlink: # symlink approach
New-Item -ItemType SymbolicLink -Path "bun.exe" -Target "bun-v1.3.14.exe"Or just keep it as |
|
No, The error is because Solutions for portable/versioned usage:
mkdir C:\tools\bun-1.3.14
copy bun-v1.3.14.exe C:\tools\bun-1.3.14\bun.exe
$env:PATH = "C:\tools\bun-1.3.14;$env:PATH"
bun x serve -s .
New-Item -ItemType HardLink -Path .\bun.exe -Target .\bun-v1.3.14.exe
.\bun.exe x serve -s .
proto install bun 1.3.14
proto use bun 1.3.14
bun x serve -s .The core issue is that Bun expects its own binary to be named @stdedos For your version-tracking habit, the symlink/directory approach gives you both — the original named file for identification plus a |
The
xsubcommand (bunx) internally tries to locate and spawnbunby name. When you rename the binary tobun-v1.3.14.exe, it can't findbunin PATH anymore and throws that error.Bun doesn't inspect its own executable path for this — it just looks for
bunin your system PATH. So renaming breaksbunx,bun install, and anything else that needs to spawn a childbunprocess.If you want to keep versioned copies, you could keep the original name and use a wrapper or symlink:
Or just keep it as
bun.exein a versioned folder likebun-1.3.14/bun.exe.