We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
a.js
import { execSync } from "node:child_process"; try { execSync("cd some-random-place"); } catch (error) { console.log("oops"); }
node version: v18.14.1 node a.js
/bin/sh: line 0: cd: some-random-place: No such file or directory oops
deno vesion: 1.36.3 deno run -A a.js
/bin/sh: line 0: cd: some-random-place: No such file or directory
node throws while deno doesn't, aren't they expected to behave the same?
The text was updated successfully, but these errors were encountered:
Yes, they are expected to behave the same. It looks like an actual bug.
Sorry, something went wrong.
Not sure when it was fixed but latest version of deno now matches the behaviour of node:
➜ bat -p t.mjs import { execSync } from "node:child_process"; try { execSync("cd some-random-place"); } catch (error) { console.log("oops"); } ➜ deno --version deno 1.41.0 (release, aarch64-apple-darwin) v8 12.1.285.27 typescript 5.3.3 ➜ deno run -A t.mjs /bin/sh: line 0: cd: some-random-place: No such file or directory oops ➜ node t.mjs /bin/sh: line 0: cd: some-random-place: No such file or directory oops
Closing this issue as resolved.
No branches or pull requests
a.js
node version: v18.14.1
node a.js
deno vesion: 1.36.3
deno run -A a.js
node throws while deno doesn't, aren't they expected to behave the same?
The text was updated successfully, but these errors were encountered: