/bin/sh: line 0: cd: some-random-place: No such file or directory
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?
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
➜ node t.mjs
/bin/sh: line 0: cd: some-random-place: No such file or directory
Closing this issue as resolved.