bun
bun copied to clipboard
bun shell does not support Chinese paths
What version of Bun is running?
1.1.7+b0b7db5c0
What platform is your computer?
Microsoft Windows NT 10.0.22631.0 x64
What steps can reproduce the bug?
import { $ } from "bun";
const args = process.argv;
if (args.length === 3) {
const results = await $`ffmpeg -i ${args[2]} -c copy ${args[2].replaceAll("_", " ")}`;
console.log(results.exitCode);
}
What is the expected behavior?
This code should be run under any path
What do you see instead?
ENOENT: No such file or directory
errno: -2
syscall: "open"
at BunShell (:184:69)
at D:\REC\新建文件夹\ffcopy.js:7:27
Additional information
No response
Bun shell does support non-ascii paths. Try running the following, does it work?
import { $ } from "bun";
const args = "新建文件";
const results = await $`echo foo > ${args}.txt`;
What is suspicious is that the error you shared indicates that the open
syscall was executed, but the code you shared should not do that.
Could you please give me a value for args[2]
that can reproduce this error?
I think you misunderstood, I meant the path where the executable is located
Thanks for clarifying, definitely looks like a problem with cwd
having non ascii paths