You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On Linux (or possibly on OS X), open two separate terminal windows.
In both windows, run cd with no arguments so you're in your home directory.
In the first terminal, run:
mkdir foo
cd foo
echo "Hello" > file.txt
In the second terminal, run:
mkdir bar
cd bar
code ~/foo/file.txt
VS Code starts up fine, and loads ~/foo/file.txt without problems.
Exit VS Code.
In the first terminal, run rmdir ~/bar. This will succeed on Linux, because processes don't lock their current working directory while running. So having a terminal window open, cd'ed into ~/bar, does not lock ~/bar and it can therefore be removed by other terminals.
Now in the second terminal, run code ~/foo/file.txt again. VS Code will fail with the following error:
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
sh: 0: getcwd() failed: No such file or directory
path.js:1184
cwd = process.cwd();
^
Error: ENOENT: no such file or directory, uv_cwd
at Error (native)
at Object.resolve (path.js:1184:25)
at Function.Module._resolveLookupPaths (module.js:263:17)
at Function.Module._resolveFilename (module.js:330:31)
at Function.Module._load (module.js:290:25)
at Module.require (module.js:367:17)
at require (internal/module.js:16:19)
at Object.<anonymous> (/usr/share/code/resources/app/out/cli.js:5:1)
at Module._compile (module.js:413:34)
at Object.Module._extensions..js (module.js:422:10)
Notes
I believe this could also be reproduced on OS X, because I think the OS X file system works similarly to Linux, but I don't have access to a Mac to test it. I was able to verify that this does NOT occur on Windows, because on Windows you can't remove a directory while any Command Prompt windows are open in that directory, and so this bug reproduction fails on step 7 on a Windows machine.
The text was updated successfully, but these errors were encountered:
Steps to Reproduce:
cd
with no arguments so you're in your home directory.mkdir foo
cd foo
echo "Hello" > file.txt
mkdir bar
cd bar
code ~/foo/file.txt
~/foo/file.txt
without problems.rmdir ~/bar
. This will succeed on Linux, because processes don't lock their current working directory while running. So having a terminal window open,cd
'ed into~/bar
, does not lock~/bar
and it can therefore be removed by other terminals.code ~/foo/file.txt
again. VS Code will fail with the following error:Notes
I believe this could also be reproduced on OS X, because I think the OS X file system works similarly to Linux, but I don't have access to a Mac to test it. I was able to verify that this does NOT occur on Windows, because on Windows you can't remove a directory while any Command Prompt windows are open in that directory, and so this bug reproduction fails on step 7 on a Windows machine.
The text was updated successfully, but these errors were encountered: