You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Struggling to reproduce the hanging call in node-pty 😕. The following test ends up calling the same native API but throws a Node.js exception just fine:
describe('WindowsTerminal',()=>{describe('constructor',()=>{describe('given an invalid launch path',()=>{it('should fail gracefully',()=>{// const term = new WindowsTerminal('');// const term = new WindowsTerminal('some_file_not_on_the_path');constterm=newWindowsTerminal('C:\\WINDOWS\\System32','',{name: "System32",cwd: "C:\\Users\\daimms.REDMOND\\Documents\\playground\\t",});});});});});
23 passing (552ms)
1 failing
1) WindowsTerminal constructor given an invalid launch path should fail gracefully:
Error: File not found: C:\WINDOWS\System32
at new WindowsPtyAgent (lib\windowsPtyAgent.js:25:24)
at new WindowsTerminal (lib\windowsTerminal.js:45:24)
at Context.<anonymous> (lib\windowsTerminal.test.js:16:32)
One way to be sure about this is to use which#112 and validate this on the JS side. One perk here is a lot of C++ code can be removed from path_utils.cc
VS Code issues:
The text was updated successfully, but these errors were encountered: