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

[Bug][VS Code 1.56] Not detect shell on Windows correctly #783

Closed
officer opened this issue May 8, 2021 · 9 comments
Closed

[Bug][VS Code 1.56] Not detect shell on Windows correctly #783

officer opened this issue May 8, 2021 · 9 comments

Comments

@officer
Copy link

officer commented May 8, 2021

  • VS Code Version: 1.56.0
  • OS Version: Windows_NT x64 10.0 19042
  • Code Runner Version: v0.11.3

Describe the bug
When we assign "Command Prompt" to "terminal.integrated.defaultProfile.windows" parameter, "&&" in code-runner.executorMap will be translated into "; if ($?) { } style which is not working on Command Prompt.

To Reproduce
Steps to reproduce the behavior:

  1. Configure "terminal.integrated.defaultProfile.windows": "Command Prompt" in settings.json
  2. Include "&&" in any of language "code-runner.executorMap".
  3. Run the code.

Actual behavior
Translate "&& " into "; if ($?) { }"

Expected behavior
Interpret "&&" as is.

Screenshots
If applicable, add screenshots to help explain your problem.

@officer
Copy link
Author

officer commented May 8, 2021

Probably it's a visual studio code side issue, but anyway I post it at here now.

@blackpancake
Copy link

I also found this problem. However, I found a temporary solution to this problem:

add "terminal.integrated.shell.windows": "C:\\Windows\\System32\\cmd.exe" in settings.json to make CodeRunner not translate & into ; if ($?) { }.

However, this will cause a warning in settings.json. I guess this may be because CodeRunner doesn't realize that vscode has abandoned the "terminal.integrated.shell.windows" setting.

image

@formulahendry formulahendry changed the title [Bug] [Bug][VS Code 1.56] Not detect shell on Windows correctly May 14, 2021
@formulahendry
Copy link
Owner

@officer @blackpancake This issue has been fixed. Please install the latest version and have a try.

@jack20951948
Copy link

image

still have issue with bash....

@blackpancake
Copy link

image

still have issue with bash....

In CMD, this issue has been fixed.
image

@formulahendry
Copy link
Owner

@jack20951948 You could use below setting:

"code-runner.terminalRoot": "/"

@jack20951948
Copy link

@jack20951948 You could use below setting:

"code-runner.terminalRoot": "/"

image
yeah...I've already had this setting...

@jack20951948
Copy link

seems in git bash still have some issues

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants