vscode-shell-command
vscode-shell-command copied to clipboard
Running the contributed command 'shellCommand.execute' failed
When I use the example of this extension I always have a problem: "Running the contributed command 'shellCommand.execute' failed"
I'm sorry. I'm having very few time at the moment to troubleshoot this.
@hwmaier @Penguinang could you check if the changes of one of you caused this?
@rafalszuta It means that your shell failed to execute. Can you execute it in terminal with an exit code of zero
By the way, is your OS linux, windows, or mac? On linux and macos, the default shell is sh, NOT bash or your system's default shell. Can you try your shell command in the /bin/sh shell?
Hi All! I'm using Windows 10 I'm trying to use your extension to list all files in the given directory
This is my tasks.json file: { "version": "2.0.0", "tasks": [ { "label": "Nested input", "command": "echo ${input:pickTest}", "type": "shell", "problemMatcher": [], }, "inputs": [ { "id": "pickTest", "type": "command", "command": "shellCommand.execute", "args": { "command": "ls" } }, ] }
I see that you added an info: command: the system command to be executed (must be in PATH)
I checked and I have the C:\Windows\SysWOW64\WindowsPowerShell\v1.0 within PATH
does dir command work? @rafalszuta
Yes
pt., 29 paź 2021, 15:37 użytkownik PengBo Yang @.***> napisał:
does dir command work? @rafalszuta https://github.com/rafalszuta
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/augustocdias/vscode-shell-command/issues/32#issuecomment-954751070, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADRFGW7VXFYP66BEEQQQUXLUJKPQ5ANCNFSM5G4HSZ2A . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
I'm not sure, but I suspect the shell actually being used might be cmd.exe instead of powershell. Does ls command fails to work in cmd.exe?
For cmd.exe is dir command instead ls. So how can I use powershel as the used console in VsCode tasks.json?
pt., 29 paź 2021, 16:27 użytkownik PengBo Yang @.***> napisał:
I'm not sure, but I suspect the shell actually being used might be cmd.exe instead of powershell. Does ls command fails to work in cmd.exe?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/augustocdias/vscode-shell-command/issues/32#issuecomment-954790011, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADRFGW4VQMRRX2HLWUVZIYDUJKVORANCNFSM5G4HSZ2A . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
At the moment it is not possible. It was implemented to use the default from vscode settings but we had to revert because of #9
since I don’t have a windows machine I can’t test and fix it, I can't do much.
@rafalszuta I think maybe you can specify powershell in "command" variable, like
"command": "powershell -Command \"echo 1\";"
Closing due to inactivity. Feel free to reopen if it's still an issue for you.