Platform Difference when launching non-existing Commands
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- node.js, typescript
- Domain
- operating-systems
Research direction
Start at the spawn entry point in lib/index.js and compare the Windows path shown in lib/windowsPtyAgent.js and lib/windowsTerminal.js with the Linux behavior for the nonexistent gurkensalat command. Determine how failure is reported on each platform; done means the behavior or reliable failure-detection contract is clearly defined and covered for both Linux and Windows.
Written by the indexing model from the issue text.
Description
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?
- Dominant language
- TypeScript
- Stars
- 2k
- Forks
- 337
- Avg merge
- 21h 58m
- Merged PRs (30d)
- 3
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from microsoft/node-pty
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
All issues in microsoft/node-pty
Similar issues
-
S: triage
Difficulty 1/5 Under an hour Newbie friendliness 85/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
fix(errors): EHOSTUNREACH from a happy-eyeballs connect is reported as a resolver error (STAMP-80) Open
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
snapshot-labs/stamp#666 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
GauravKarakoti/SecureFlow#1070 · 1 comment ·
-
feature:Languages/Translations good first issue ready Web
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
digitalfabrik/integreat-app#4394 ·