cli / cli

GitHub’s official command line tool
https://cli.github.com
MIT License
36.6k stars 5.59k forks source link

gh cs code "error opening Visual Studio Code: exit status 1" #9321

Closed iceking-1912 closed 1 month ago

iceking-1912 commented 1 month ago

Describe the bug

Version Information

❯ gh --version                                                                                                                               
gh version 2.47.0 (2024-04-03)
htts://github.com/cli/cli/releases/tag/v2.47.0
❯ gh cs code                                                                                                                                
? Choose codespace: "CODESPACENAME": ominous space system
error opening Visual Studio Code: exit status 1"

Hey fellas while I was opening a codespace from my WSL terminal using gh cli I got this error (terminal command and output is pasted above ) and it only opens Windows Explorer and even after trying to find a solution online, I could not find any definite solution please help me solution this problem

williammartin commented 1 month ago

Hmm, sorry you're running into issues, not sure what the issue could be here. There seems to be some information about VS Code exiting with status 1 on WSL here: https://code.visualstudio.com/docs/supporting/troubleshoot-terminal-launch#_the-terminal-exited-with-code-1-on-windows-10-with-wsl-as-the-default-shell

Did you look at that already?

williammartin commented 1 month ago

Just to check, there's definitely nothing more in the output when you see:

error opening Visual Studio Code: exit status 1"

?

iceking-1912 commented 1 month ago

Hey I checked it again

" ❯ gh cs code ? Choose codespace: "REPO and CODESPACE NAME" w3m: Can't load vscode://github.codespaces/connect?name=verbose-halibut-6wx6wxjwxg62xqw6&windowId=_blank. error opening Visual Studio Code: exit status 2 "

I got this output first it was opened in w3m and then crashed and showed up with this error. it is perfectly fine with Powershell but does not work with WSl terminal and I couldn't find an answer on the webpage you mentioned.