You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import{$}from"bun";constfields="name scripts"await$`npm pkg get ${fields}`;
What is the expected behavior?
I expect that code to show the package name and scripts like this code does:
import{$}from"bun";constfields=["name","scripts"];await$`npm pkg get ${fields}`;
What do you see instead?
ShellError: Failed with exit code 1
info: {
"exitCode": 1,
"stderr": "'C:\\Program' is not recognized as an internal or external command,\r\noperable program or batch file.\r\n",
"stdout": ""
}
SunsetTechuila
changed the title
[Bun Shell]: Error calling cmd/bat scripts when both arguments and path contain spaces on Windows
[Bun Shell]: Error calling cmd/bat scripts when both args and path contain spaces on Windows
May 24, 2024
it is ok not to pass the absolute path
libuv (library, which both bun and node use to spawn processes) docs:
Since uv_spawn uses execvp(3) internally, there is no need to supply the full path.
so committing the second suggested fix would be fine, I think. Let me know if it is - I'll open a PR
SunsetTechuila
changed the title
[Bun Shell]: Error calling cmd/bat scripts when both args and path contain spaces on Windows
[Bun Shell]: Error calling cmd/bat scripts when both args and path contain spaces
May 24, 2024
What version of Bun is running?
1.1.9+bb13798d9
What platform is your computer?
Microsoft Windows NT 10.0.22635.0 x64
What steps can reproduce the bug?
run
What is the expected behavior?
I expect that code to show the package name and scripts like this code does:
What do you see instead?
Additional information
related: nodejs/node#7367
possible fixes:
SunsetTechuila@d963370
SunsetTechuila@1c05351
wrapping path in quotes doesn't seem to work
The text was updated successfully, but these errors were encountered: