microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
163.96k stars 29.18k forks source link

[BUG] Deleting CWD of the active terminal causes the terminal panel to close #98025

Closed NightMachinery closed 4 years ago

NightMachinery commented 4 years ago

Issue Type: Bug

Steps to Reproduce:

  1. Open an embedded terminal to ~/tmp/
  2. Delete ~/tmp
  3. Try accessing the terminal panel to, e.g., create a new terminal.

VS Code version: Code - Insiders 1.46.0-insider (6849775440496504e0677ffcf2a46d47ad9130f5, 2020-05-15T09:06:06.454Z) OS version: Darwin x64 19.0.0

System Info |Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i5-6267U CPU @ 2.90GHz (4 x 2900)| |GPU Status|2d_canvas: enabled
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: enabled_on
oop_rasterization: disabled_off
protected_video_decode: unavailable_off
rasterization: enabled
skia_renderer: disabled_off_ok
video_decode: enabled
viz_display_compositor: enabled_on
viz_hit_test_surface_layer: disabled_off_ok
webgl: enabled
webgl2: enabled| |Load (avg)|6, 4, 4| |Memory (System)|8.00GB (0.08GB free)| |Process Argv|-psn_0_28257009| |Screen Reader|no| |VM|0%|
Extensions (38) Extension|Author (truncated)|Version ---|---|--- better-comments|aar|2.0.5 interactive-scala|als|1.2.1 better-toml|bun|0.3.2 gitignore|cod|0.6.0 bracket-pair-colorizer-2|Coe|0.1.3 scala|dal|0.0.5 vsc-material-theme|Equ|32.6.0 vsc-material-theme-icons|equ|1.1.4 language-julia|jul|0.15.32 crystal-ide|kof|0.0.4 dotty|lam|0.1.16 Lisp|mat|0.1.10 vscode-docker|ms-|1.2.0 python|ms-|2020.5.78807 remote-containers|ms-|0.117.1 remote-ssh|ms-|0.51.0 remote-ssh-edit|ms-|0.51.0 remote-wsl|ms-|0.44.2 vscode-remote-extensionpack|ms-|0.20.0 powershell|ms-|2020.4.0 vscode-paste-image|mus|1.0.4 gradle-language|nac|0.2.3 java|red|0.61.0 datetime|rid|2.0.1 rust|rus|0.7.8 scala|sca|0.3.9 ayu|tea|0.18.0 vscode-lldb|vad|1.5.0 vscodeintellicode|Vis|1.2.7 vscode-java-debug|vsc|0.26.0 vscode-java-dependency|vsc|0.10.1 vscode-java-pack|vsc|0.9.1 vscode-java-test|vsc|0.22.4 vscode-maven|vsc|0.21.4 org-mode|vsc|1.0.0 vim|vsc|1.14.3 debug|web|0.24.0 markdown-all-in-one|yzh|2.8.0 (5 theme extensions excluded)
Tyriar commented 4 years ago

Do you mean you have a VS Code window opened at ~/tmp and then you delete the folder causes the terminal not to work?

NightMachinery commented 4 years ago

@Tyriar Yes. It causes the whole terminal panel to stop working. I deleted the directory via an external terminal, but I doubt that matters.

Tyriar commented 4 years ago

I cannot reproduce:

Screen Shot 2020-07-08 at 2 37 54 PM

Of course some weirdness is expected as the folder you had opened no longer exists, it's up to how the shell handles it though.

github-actions[bot] commented 4 years ago

This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines.

Happy Coding!

NightMachinery commented 4 years ago

@Tyriar I have encountered this again; I had misdiagnosed the issue the first time. The problem arises when the root of the workspace no longer exists. In this example, I renamed the root of the project from outside VSCode, and the terminal panel exits with this error if activated:

image

image