-
Notifications
You must be signed in to change notification settings - Fork 299
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
The token '&&' is not a valid statement separator in this version. #491
Comments
Workaround: add This is a VSC's feature... See microsoft/vscode-cpptools#3718 (comment) |
@imba-tjd that is not the right place to link it. We at the the CppTools extension don't have anything to do with VS Code's features. Please file/link issues to their repo at https://github.com/microsoft/vscode/issues |
@pieandcakes I know, but I just want the notice and that 2 more links which Tyriar mentioned. 😄 |
Can you update your link to: microsoft/vscode-cpptools#3718 (comment) so its the specific comment? |
🆗 |
I'm weak. I still don't know how to solve this problem. |
@xia1065 please refer to https://code.visualstudio.com/docs/editor/integrated-terminal#_configuration |
Let's see whether microsoft/vscode#75091 would be useful |
Thank you. I've settled it. The problem was solved by clicking on "Select the default shell" in "Terminal". |
Have a workaround fix for this issue. |
I am having the same issue right now. How exactly did you fix it |
I remember adjusting that PowerShell in my circle.emm.. you can have try to change optiona.
…---Original---
From: "jesusarockias"<notifications@github.com>
Date: Wed, Oct 16, 2019 18:07 PM
To: "formulahendry/vscode-code-runner"<vscode-code-runner@noreply.github.com>;
Cc: "xiachangsong"<1065256104@qq.com>;"Mention"<mention@noreply.github.com>;
Subject: Re: [formulahendry/vscode-code-runner] The token '&&' is not a valid statement separator in this version. (#491)
I am having the same issue right now. How exactly did you fix it
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
For now you don't need to change anything. So you two probably not have the same issue as this one. But you can always use the "shell-specific" command. |
You just need to change "&&" to ";" |
Yeah but that doesn't solve the problem if an npm package calls that command, right? |
Running this -Raag! |
You must use CMD default Windows. cant with VSC or GIT bash |
This solve my problem. |
But where should i change it please tell me i am now in this |
Tested for Windows 7 / Visual Studio Code version 1.53.2
-> The $dir$fileNameWithoutExt command doesn't work properly! Double quotes ("...") are placed wrong. "c": "cd $dir ; gcc $fileName -o $fileNameWithoutExt ; $Env:PATH += $dir ; & \".\\$fileNameWithoutExt\"",
Result of the output: PS C:\my_Visual_Studio_Code> cd "c:\my_Visual_Studio_Code\5_hello_CPP" ; g++ 5_helloworld.cpp -o 5_helloworld ; $Env:PATH += "c:\my_Visual_Studio_Code\5_hello_CPP" ; & ".\5_helloworld" |
Worked for me too . Thanks a lot |
This problem can be fixed by following few steps:
then run the code again and enjoy. |
Thanks a lot bro. Literally man you nailed it...Thanks again. |
Hello,
sees you have a newer Version of the coderunner. (......code-runner-0.11.2 -> ...... code-runner-0.11.3)
So open the directory that you marked and continue as discribed.
C. Baumeister
Gesendet: Dienstag, 20. April 2021 um 19:27 Uhr
Von: "atharvabhomle" ***@***.***>
An: "formulahendry/vscode-code-runner" ***@***.***>
Cc: "Chruftl" ***@***.***>, "Comment" ***@***.***>
Betreff: Re: [formulahendry/vscode-code-runner] The token '&&' is not a valid statement separator in this version. (#491)
Tested for Windows 7 / Visual Studio Code version 1.53.2
Search in the following directory for a file "package.json":
C:\Users\Name_of_your_Computer.vscode\extensions\formulahendry.code-runner-0.11.2
-> first make a copy of the file!
Edit this file using Visual Studio Code. (-> copy the directory path from the Windows-Explorer to the "Open File" )
Go to Line 129, 130 and 131 (about) and change the entries to somthing like that:
( replace all "&&" by ";" - set additional the path ; - remove $dir(before$fileNameWithoutExt) for the last call - and set "artificial" double quotes "...." by " and .... " - add & .\ in front of the Filename [ & ".\Filename"] ) :
-> The $dir$fileNameWithoutExt command doesn't work properly! Double quotes ("...") are placed wrong.
"c": "cd $dir ; gcc $fileName -o $fileNameWithoutExt ; $Env:PATH += $dir ; & ".\$fileNameWithoutExt"",
"cpp": "cd $dir ; g++ $fileName -o $fileNameWithoutExt ; $Env:PATH += $dir ; & ".\$fileNameWithoutExt"",
"objective-c": "cd $dir ; gcc -framework Cocoa $fileName -o $fileNameWithoutExt ;$Env:PATH += $dir ; & ".\$fileNameWithoutExt"",
Close and restart the program twice (really!! / do it / don't think about).
Result of the output:
Windows PowerShell
Copyright (C) 2009 Microsoft Corporation. Alle Rechte vorbehalten.
PS C:\my_Visual_Studio_Code> cd "c:\my_Visual_Studio_Code\5_hello_CPP" ; g++ 5_helloworld.cpp -o 5_helloworld ; $Env:PATH += "c:\my_Visual_Studio_Code\5_hello_CPP" ; & ".\5_helloworld"
hello world -
PS C:\my_Visual_Studio_Code\5_hello_CPP>
i encountered same problem but in your first step the file you have referring is folder as i can see. I hve attached SS now tell me what to do?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Thanks a lot!!! |
DONOT USE && and || any more Try to use
example Like that. |
Thanks.
…On Mon, Aug 16, 2021, 00:43 Dhanushka-Sasanka ***@***.***> wrote:
DONOT USE && and || any more
Try to use
1. && ==== > -and
2. | | ===;=> -or
*example*
( command ) -and ( command )
Like that.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#491 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AS2XNXNMDYZ2XXRF4GJN34LT5AGTZANCNFSM4HU6ASTQ>
.
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&utm_campaign=notification-email>
.
|
Describe the bug
To Reproduce
Steps to reproduce the behavior:
Upgrade VSC from 1.34.0 to 1.35.0.
截图没更改execute map;当然改了也是一样的问题。c、c++、c#都有这个问题,所以与语言无关。
宿主机一直可以复现,1.34.0不存在此问题,更新到1.35.0后出现。
我也在我的win7 x86 vm测试了一下,这个问题本来是有的,覆盖1.34.0再覆盖1.35.0后又消失了。
消失是指会用PS的语法,比如
&&
会被自动替换为分号,会有$?
之类的。The text was updated successfully, but these errors were encountered: