Tab crashes when opening in a missing CWD
Artemis21 opened this issue · comments
-
I am on the latest Hyper.app version
-
I have searched the issues of this repo and believe that this is not a duplicate
-
OS version and name: Fedora 38
-
Hyper.app version: 3.4.1
-
Link of a Gist with the contents of your hyper.json: hyper config gist
-
Relevant information from devtools: N/A
-
The issue is reproducible in vanilla Hyper.app: No change after disabling all extensions. Presumably config with
preserveCWD: true
would not be affected by the same steps.
Issue
Steps:
- Launch hyper
- Have
preserveCWD: true
in config mkdir test
cd test
rm -r ../test
- Open a new tab
Observed:
Error messages scrolling by very quickly, followed by the tab closing.
Expected:
A new tab to open in the closest existing ancestor of the missing directory, or other reasonable fall-back behaviour.
Notes:
- This happens with both fish and sh shells.
- A screenshot showing part of the error message seen. Most or all of the errors appear to be the same as this, though it goes too fast for me to be sure (also, it closes too fast for me to copy the text, so please excuse the screenshot).
- Running the
hyper
command from a missing directory also fails:shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory node:internal/bootstrap/switches/does_own_process_state:126 cachedCwd = rawMethods.cwd(); ^ Error: ENOENT: no such file or directory, uv_cwd at process.wrappedCwd [as cwd] (node:internal/bootstrap/switches/does_own_process_state:126:28) at t.find (/opt/Hyper/resources/bin/cli.js:2:152432) at e.exports (/opt/Hyper/resources/bin/cli.js:2:151343) at i (/opt/Hyper/resources/bin/cli.js:2:150626) at Module.<anonymous> (/opt/Hyper/resources/bin/cli.js:2:148380) at r (/opt/Hyper/resources/bin/cli.js:2:614310) at /opt/Hyper/resources/bin/cli.js:2:614977 at /opt/Hyper/resources/bin/cli.js:2:618469 at Object.<anonymous> (/opt/Hyper/resources/bin/cli.js:2:618473) at Module._compile (node:internal/modules/cjs/loader:1120:14) { errno: -2, code: 'ENOENT', syscall: 'uv_cwd' }
- The same issue is not observed in gnome terminal.
A check for this case seems to have been added in this commit, not sure why that's not working