Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The terminal process terminated with exit code: 127 after invalid command enter then exit in Git bash terminal #108881

Closed
tpfarul opened this issue Oct 18, 2020 · 3 comments
Assignees
Labels
*question Issue represents a question, should be posted to StackOverflow (VS Code)

Comments

@tpfarul
Copy link

tpfarul commented Oct 18, 2020

Steps to reproduce:

  1. Update Git with latest build (I got v2.28.0.windows.1)
  2. Update Visual Studio Code (I got v1.50.1)
  3. Open Visual Studio code from any one directory as a workspace
  4. Open terminal. In my case default terminal would be Git bash.exe
  5. enter valid command like '$ ls -l', then type '$ exit' to close. here bash terminal close without any issue
  6. Open terminal again (steps 4) then enter invalid command '$hellovsc' then type '$exit'. here I received 'The terminal process "C:\Program Files\Git\bin\bash.exe" terminated with exit code: 127.' error message.
  7. I suspect invalid command response causing some issue with terminal exit status.
  8. To confirm step 7 assumption opne terminal again (step 4) then enter a invalid command '$hellovsc' then type a valid command '$ls -l' then type '$exit' to close. This time terminal closed without any error.

Application info
VSC Version: 1.50.1 (user setup)
Commit: d2e414d
Date: 2020-10-13T15:06:15.712Z
Electron: 9.2.1
Chrome: 83.0.4103.122
Node.js: 12.14.1
V8: 8.3.110.13-electron.0
OS: Windows_NT x64 10.0.18363
GIT: 2.28.0.windows.1

Systems info:

CPUs Intel(R) Core(TM) i5-6200U CPU @ 2.30GHz (4 x 2400)
GPU Status 2d_canvas: enabled flash_3d: enabled flash_stage3d: enabled flash_stage3d_baseline: enabled gpu_compositing: enabled multiple_raster_threads: enabled_on oop_rasterization: disabled_off opengl: enabled_on protected_video_decode: unavailable_off rasterization: enabled skia_renderer: disabled_off_ok video_decode: enabled vulkan: disabled_off webgl: enabled webgl2: enabled
Load (avg)  
Memory (System) 7.87GB (1.64GB free)
Process Argv --crash-reporter-id 73688476-101c-4294-aa99-13c447d8f5ec
Screen Reader no
VM 0%

Extension info:

Extension Author (truncated) Version
Bookmarks ale 11.4.0
ng-template Ang 0.1001.0
All-Autocomplete Ati 0.0.23
gitlens eam 10.2.2
go gol 0.17.2
output-colorizer IBM 0.1.2
vscode-dimmer-block ima 2.2.0
vscode-essentials jab 1.5.0
yuml Jai 3.5.1
bash-ide-vscode mad 1.11.0
git-graph mhu 1.26.0
vscode-docker ms- 1.6.0
vscode-devskim MS- 0.4.193
vscode-kubernetes-tools ms- 1.2.1
mssql ms- 1.9.0
vscode-postgresql ms- 0.3.0
python ms- 2020.9.114305
remote-containers ms- 0.145.0
remote-ssh ms- 0.55.0
remote-ssh-edit ms- 0.55.0
remote-wsl ms- 0.50.1
vscode-sanddance msr 3.1.0
subtle-brackets raf 3.0.0
java red 0.69.0
vscode-rsp-ui red 0.23.5
vscode-server-connector red 0.23.5
vscode-xml red 0.13.0
vscode-yaml red 0.11.1
sonarqube-inject sil 2.1.0
sonarlint-vscode Son 1.17.0
shellcheck tim 0.12.1
vscodeintellicode Vis 1.2.10
vscode-java-debug vsc 0.29.0
vscode-java-dependency vsc 0.13.0
vscode-java-pack vsc 0.10.0
vscode-java-test vsc 0.24.2
vscode-maven vsc 0.24.2
@vscodebot
Copy link

vscodebot bot commented Oct 18, 2020

(Experimental duplicate detection)
Thanks for submitting this issue. Please also check if it is already covered by an existing one, like:

@Tyriar
Copy link
Member

Tyriar commented Oct 30, 2020

I can't reproduce this, but if it's saying 127 after you run exit, that's just the code that git bash exited with. I know macOS also provides unexpected exit codes when running exit sometimes as well. You can workaround this by killing the terminal instead (the bin icon), or use this setting:

"terminal.integrated.showExitAlert": false

@Tyriar Tyriar closed this as completed Oct 30, 2020
@Tyriar Tyriar added the *question Issue represents a question, should be posted to StackOverflow (VS Code) label Oct 30, 2020
@leozicai
Copy link

leozicai commented Dec 3, 2020

I also got the same error when running a program A.py on vscode remotely connecting to the server via SSH. But I can run other programs normally in this way. Even I copy the code of A.py to other programs and it works normally. I found that the only difference in A.py is that the name of its parent folder contains the symbol &. After I removed the & in the folder name, it returned to normal. Maybe this can help you.

@github-actions github-actions bot locked and limited conversation to collaborators Dec 14, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*question Issue represents a question, should be posted to StackOverflow (VS Code)
Projects
None yet
Development

No branches or pull requests

3 participants