fabiospampinato / vscode-terminals

An extension for setting-up multiple terminals at once, or just running some commands.
MIT License
121 stars 19 forks source link

Cannot start console #18

Closed Ash258 closed 5 years ago

Ash258 commented 5 years ago

When running single terminal. Nothing happen, only error is logged.

Environment:

Terminals Manager: 1.12.1 Version: 1.29.0-insider Commit: 45d5d153bbebed743b77e426615aade34971eb46 Date: 2018-10-19T06:58:45.940Z Electron: 2.0.11 Chrome: 61.0.3163.100 Node.js: 8.9.3 V8: 6.1.534.41 Architecture: x64

Terminal configuration to start:

{
    "name": "Cmder",
    "shellPath": "C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe",
    "shellArgs": [
        "-ExecutionPolicy",
        "Bypass",
        "-NoLogo",
        "-NoProfile",
        "-NoExit",
        "-Command",
        ". 'S:\\Scoop\\apps\\cmder-full\\current\\config\\user-profile.ps1'"
    ],
    "focus": true,
    "icon": "code",
    "open": true,
}

Error:

console.ts:134 [Extension Host] rejected promise not handled within 1 second (at Timeout._onTimeout (s:\Scoop\apps\vscode-insiders\nightly-20181019\resources\app\out\vs\workbench\node\extensionHostProcess.js:717:9))
t.log @ console.ts:134
t._logExtensionHostMessage @ extensionHost.ts:437
(anonymous) @ extensionHost.ts:244
emitTwo @ events.js:126
emit @ events.js:214
emit @ internal/child_process.js:772
_combinedTickCallback @ internal/process/next_tick.js:141
_tickCallback @ internal/process/next_tick.js:180
log.ts:169   ERR Cannot read property 'show' of undefined: TypeError: Cannot read property 'show' of undefined
    at S:\Scoop\persist\vscode-insiders\data\extensions\fabiospampinato.vscode-terminals-1.12.1\out\extension.js:9:72580
    at Generator.next (<anonymous>)
    at o (S:\Scoop\persist\vscode-insiders\data\extensions\fabiospampinato.vscode-terminals-1.12.1\out\extension.js:9:72130)
    at <anonymous>
fabiospampinato commented 5 years ago

Can you reproduce this on stable (v1.28.2)?

fabiospampinato commented 5 years ago

Also this doesn't look like a single argument to me, maybe this is the problem 🤔:

        ". 'S:\\Scoop\\apps\\cmder-full\\current\\config\\user-profile.ps1'"

Does the issue happen also with simpler terminals configurations?

Ash258 commented 5 years ago

ON stable:

Stable

It's valid configuration (Normal code with terminal.integrated.shellArgs.window does not have problem).

If the value of Command is a string, Command must be the last parameter in the command , because any characters typed after the command are interpreted as the command arguments.

It's happening with all configuration in screen, which look like this (different executables)

{
    "name": "Powershell Core",
    "shellPath": "S:\\Scoop\\apps\\pwsh\\current\\pwsh.exe",
    "focus": true,
    "icon": "code",
    "open": true
},
fabiospampinato commented 5 years ago

It should now work properly in v1.12.2, do you confirm? I haven't tested your exact configuration because I'm on macOS, but there there was an issue with shellArgs which should be fixed now, and terminals without commands weren't supported.

Ash258 commented 5 years ago

Yes. 🎉 All work now. Thank you for fast fix 😍

fabiospampinato commented 5 years ago

Thank you for reporting the problem ;) Either nobody before you used shellArgs or nobody reported the problem.