-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Open
Labels
Description
What happened?
If the current working directory that is passed to the command doesn't exist, the error is very confusing and difficult to debug
How it should work?
The error should be related to missing directory
How to reproduce the bug?
Given following file:
#!/usr/bin/env -S deno run -A
import "npm:zx@8.8.5/globals";
$.verbose = true;
await $({ cwd: '/path/that/doesnt/exist' })`cat test`
Execute the script
chmod +x ./test.ts && ./test.ts
Version
8.8.5
What's OS kind?
Mac
What JS runtime is used?
Deno
Runtime Version
deno 2.6.5 (stable, release, aarch64-apple-darwin), v8 14.2.231.17-rusty, typescript 5.9.2
Error stack / relevant log output
user@pc scripts % chmod +x ./test.ts && ./test.ts
$ cat test
error: Top-level await promise never resolved
await $({ cwd: '/path/that/doesnt/exist' })`cat test`
^
at <anonymous> (file:///Users/user/scripts/test.ts:7:1)Code of Conduct
- I agree to follow this project's Code of Conduct
Reactions are currently unavailable