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

Terminal profile contribution from VS Code extension throws exception if vscode.TerminalOptions.shellPath lacks ".exe" extension on Windows #12734

Closed
jcortell68 opened this issue Jul 19, 2023 · 2 comments · Fixed by #12761
Assignees

Comments

@jcortell68
Copy link
Contributor

Bug Description:

I'm trying to contribute a terminal profile from a VS Code extension. If in the provider I fail to specify the ".exe" executable in vscode.TerminalOptions.shellPath, a "File not found" exception is thrown. In VS Code, it works fine without specifying the extension.

2023-07-19T22:04:58.500Z terminal ERROR Error: File not found: 
    at WindowsPtyAgent (C:\j.cortell\git\theiasandbox\node_modules\node-pty\src\windowsPtyAgent.ts:103:49)
    at WindowsTerminal (C:\j.cortell\git\theiasandbox\node_modules\node-pty\src\windowsTerminal.ts:51:19)
    at spawn (C:\j.cortell\git\theiasandbox\node_modules\node-pty\src\index.ts:30:10)
    at TerminalProcess (C:\j.cortell\git\theiasandbox\node_modules\@theia\process\src\node\terminal-process.ts:83:34)
    at ShellProcess (C:\j.cortell\git\theiasandbox\node_modules\@theia\terminal\src\node\shell-process.ts:64:9)
    at createInstanceWithInjections (C:\j.cortell\git\theiasandbox\node_modules\inversify\src\resolution\instantiation.ts:67:17)
    at _createInstance (C:\j.cortell\git\theiasandbox\node_modules\inversify\src\resolution\instantiation.ts:55:16)
    at resolveInstance (C:\j.cortell\git\theiasandbox\node_modules\inversify\src\resolution\instantiation.ts:145:18)
    at _getResolvedFromBinding (C:\j.cortell\git\theiasandbox\node_modules\inversify\src\resolution\resolver.ts:77:31)
    at <anonymous> (C:\j.cortell\git\theiasandbox\node_modules\inversify\src\resolution\resolver.ts:111:18)

Note that working around this bug by specifying the extension unfortunately leads you into the more general bug that opening a terminal in Theia hangs the app: #12733

Additional Information

  • Operating System: Windows
  • Theia Version: 1.39
@cdamus
Copy link
Contributor

cdamus commented Jul 24, 2023

I'll be happy to look into this.

cdamus added a commit to cdamus/theia that referenced this issue Jul 26, 2023
Support implicit '.exe' extension on the shell
command in terminal profiles as in VS Code.

Fixes eclipse-theia#12734

Signed-off-by: Christian W. Damus <cdamus.ext@eclipsesource.com>
cdamus added a commit to cdamus/theia that referenced this issue Jul 26, 2023
Support implicit '.exe' extension on the shell
command in terminal profiles as in VS Code.

Fixes eclipse-theia#12734

Signed-off-by: Christian W. Damus <cdamus.ext@eclipsesource.com>
cdamus added a commit to cdamus/theia that referenced this issue Jul 26, 2023
Support implicit '.exe' extension on the shell
command in terminal profiles as in VS Code.

Fixes eclipse-theia#12734

Signed-off-by: Christian W. Damus <cdamus.ext@eclipsesource.com>
cdamus added a commit to cdamus/theia that referenced this issue Jul 26, 2023
Support implicit '.exe' extension on the shell
command in terminal profiles as in VS Code.

Fixes eclipse-theia#12734

Signed-off-by: Christian W. Damus <cdamus.ext@eclipsesource.com>
cdamus added a commit to cdamus/theia that referenced this issue Jul 27, 2023
Support implicit '.exe' extension on the shell
command in terminal profiles as in VS Code.

Fixes eclipse-theia#12734

Signed-off-by: Christian W. Damus <cdamus.ext@eclipsesource.com>
cdamus added a commit to cdamus/theia that referenced this issue Jul 27, 2023
Support implicit '.exe' extension on the shell
command in terminal profiles as in VS Code.

Fixes eclipse-theia#12734


Contributed on behalf of STMicroelectronics.

Signed-off-by: Christian W. Damus <cdamus.ext@eclipsesource.com>
cdamus added a commit to cdamus/theia that referenced this issue Aug 1, 2023
Support implicit '.exe' extension on the shell
command in terminal profiles as in VS Code.

Fixes eclipse-theia#12734

Signed-off-by: Christian W. Damus <cdamus.ext@eclipsesource.com>
jfaltermeier pushed a commit that referenced this issue Aug 7, 2023
Support implicit '.exe' extension on the shell
command in terminal profiles as in VS Code.

Fixes #12734

Signed-off-by: Christian W. Damus <cdamus.ext@eclipsesource.com>
@jcortell68
Copy link
Contributor Author

@cdamus Thanks for fixing this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants