Skip to content

fix: syntax error with PowerShell 5.1#4

Merged
riywo merged 1 commit intomainfrom
fix/syntax-error-pwsh5
Sep 7, 2024
Merged

fix: syntax error with PowerShell 5.1#4
riywo merged 1 commit intomainfrom
fix/syntax-error-pwsh5

Conversation

@riywo
Copy link
Copy Markdown
Member

@riywo riywo commented Sep 7, 2024

PowerShell 5.1 is old but still in support because it's a part of Windows 10/11: PowerShell/PowerShell#16971

So, we should keep supporting PowerShell 5.1 until its EOL.

For now, this tiny invalid syntax causes an error with 5.1 and this commit is fixing it.

Error

iex : At line:178 char:50
+       7z.exe x -txz "${src}" -so > "${temp_tar}" && 7z.exe x -ttar "$ ...
+                                                  ~~
The token '&&' is not a valid statement separator in this version.
At line:1 char:61
+ Get-Content .\toolset\shellcheck\install.ps1 | Out-String | iex
+                                                             ~~~
    + CategoryInfo          : ParserError: (:) [Invoke-Expression], ParseException
    + FullyQualifiedErrorId : InvalidEndOfLine,Microsoft.PowerShell.Commands.InvokeExpressionCommand

Follow up

PowerShell 5.1 is old but still in support because it's a part of Windows 10/11:
PowerShell/PowerShell#16971

So, we should keep supporting PowerShell 5.1 until its EOL.

For now, this tiny invalid syntax causes an error with 5.1
and this commit is fixing it.
@riywo riywo enabled auto-merge (squash) September 7, 2024 07:25
@riywo riywo merged commit 577b7b7 into main Sep 7, 2024
@riywo riywo deleted the fix/syntax-error-pwsh5 branch September 7, 2024 07:27
@opsbr-bot
Copy link
Copy Markdown
Contributor

opsbr-bot Bot commented Sep 7, 2024

Released by v1.0.2

@opsbr-bot opsbr-bot Bot added the released label Sep 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant