Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

The token '&&' is not a valid statement separator in this version. #423

Closed
DJStompZone opened this issue Mar 24, 2024 · 0 comments · Fixed by #424
Closed

The token '&&' is not a valid statement separator in this version. #423

DJStompZone opened this issue Mar 24, 2024 · 0 comments · Fixed by #424

Comments

@DJStompZone
Copy link
Contributor

Summary

When attempting to run the command as shown in the readme, Windows Powershell throws an error: The token '&&' is not a valid statement separator in this version.

Additional Information

The full text of the error is as follows:

PS C:\Users\djstomp\.ssh> winget install -h -e --id "WinFsp.WinFsp" && winget install -h -e --id "SSHFS-Win.SSHFS-Win"

At line:1 char:43
+ winget install -h -e --id "WinFsp.WinFsp" && winget install -h -e --i ...
+                                           ~~
The token '&&' is not a valid statement separator in this version.
    + CategoryInfo          : ParserError: (:) [], ParentContainsErrorRecordException
    + FullyQualifiedErrorId : InvalidEndOfLine

Here is some basic info regarding my powershell version, etc.

PS C:\Users\djstomp> Get-PSEnvironmentInfo -OutputType string
Powershell Env Info
  © DJ Stomp 2024
"No Rights Reserved"

Powershell Environment:
------------------------
PSVersion: 5.1.19041.4170
PSEdition: Desktop Edition
BuildVersion: 10.0.19041.4170
CLRVersion: 4.0.30319.42000
PSHOME: %WINDIR%\System32\WindowsPowerShell\v1.0
CurrentExePath: $PSHOME\powershell.exe

Proposed solution

This can be avoided by simply replacing the && with a semicolon.

PS C:\Users\djstomp\.ssh> winget install -h -e --id "WinFsp.WinFsp" ; winget install -h -e --id "SSHFS-Win.SSHFS-Win"
Successfully installed

I'll be submitting a PR to address this shortly.

Cheers!

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

1 participant