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

Platform Difference when launching non-existing Commands #689

Open
tsmaeder opened this issue Jun 23, 2024 · 2 comments
Open

Platform Difference when launching non-existing Commands #689

tsmaeder opened this issue Jun 23, 2024 · 2 comments
Labels
bug Issue identified by VS Code Team member as probable bug

Comments

@tsmaeder
Copy link

Environment details

  • OS: Linux/Window
  • OS version: Ubuntu 22, Windows 11
  • node-pty version: 1.0.0

Issue description

The following program behaves very differently on Windows vs. Linux:

const pty = require('node-pty');


const process = pty.spawn('gurkensalat', [], {});

console.log(`process pid = ${process.pid}`);

On Windows, this program throws an Error

C:\Users\thomas\code\EclipseSource\theia\node_modules\node-pty\lib\windowsPtyAgent.js:80
            term = this._ptyNative.startProcess(file, cols, rows, debug, this._generatePipeName(), conptyInheritCursor);
                                   ^

Error: File not found:
    at new WindowsPtyAgent (C:\Users\thomas\code\EclipseSource\theia\node_modules\node-pty\lib\windowsPtyAgent.js:80:36)
    at new WindowsTerminal (C:\Users\thomas\code\EclipseSource\theia\node_modules\node-pty\lib\windowsTerminal.js:51:24)
    at Object.spawn (C:\Users\thomas\code\EclipseSource\theia\node_modules\node-pty\lib\index.js:29:12)
    at Object.<anonymous> (C:\Users\thomas\code\EclipseSource\theia\packages\process\foo.js:4:21)

whereas on Linux it prints a pid.

I think I remember that in previous versions, the spawn call would fail for Linux also. Is there a way to still detect those failures on Linux reliably?

@rajdama
Copy link

rajdama commented Jul 8, 2024

I am also facing same issue

@Tyriar
Copy link
Member

Tyriar commented Dec 17, 2024

/duplicate #112

Also I think you probably need to use the extension on Windows.

@Tyriar Tyriar closed this as completed Dec 17, 2024
@Tyriar Tyriar reopened this Jan 6, 2025
@Tyriar Tyriar added the bug Issue identified by VS Code Team member as probable bug label Jan 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue identified by VS Code Team member as probable bug
Projects
None yet
Development

No branches or pull requests

3 participants