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

2.4.0 | "Unexpected token 'Œâ”€â”€â”€â”€â”€â”�${e}[32m┌─────â”�"' in expression or statement." etc. #134

Closed
tordenflesk opened this issue May 1, 2022 · 10 comments · Fixed by #135

Comments

@tordenflesk
Copy link

tordenflesk commented May 1, 2022

At C:\Users\Tordenflesk\scoop\apps\winfetch\current\winfetch.ps1:462 char:33
+ ...     "${e}[${t};31m┌─────�${e}[32m┌─────�"
+                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Unexpected token 'Œâ”€â”€â”€â”€â”€â”�${e}[32m┌─────â”�"' in expression or statement.
At C:\Users\Tordenflesk\scoop\apps\winfetch\current\winfetch.ps1:463 char:33
+                 "${e}[${t};31m│     │${e}[32m│     │"
+                                 ~~~~~~~~~
Unexpected token '‚     │' in expression or statement.
At C:\Users\Tordenflesk\scoop\apps\winfetch\current\winfetch.ps1:463 char:42
+                 "${e}[${t};31m│     │${e}[32m│     │"
+                                          ~~~~
Unexpected token '${e}' in expression or statement.
At C:\Users\Tordenflesk\scoop\apps\winfetch\current\winfetch.ps1:463 char:47
+                 "${e}[${t};31m│     │${e}[32m│     │"
+                                               ~
Array index expression is missing or not valid.
At C:\Users\Tordenflesk\scoop\apps\winfetch\current\winfetch.ps1:463 char:47
+                 "${e}[${t};31m│     │${e}[32m│     │"
+                                               ~~~~~~~~~~~~~~~
Unexpected token '32m│     │"
                "${e}[${t};31m│' in expression or statement.
At C:\Users\Tordenflesk\scoop\apps\winfetch\current\winfetch.ps1:468 char:33
+                 "${e}[${t};34m│     │${e}[33m│     │"
+                                 ~~~~~~~~~
Unexpected token '‚     │' in expression or statement.
At C:\Users\Tordenflesk\scoop\apps\winfetch\current\winfetch.ps1:468 char:42
+                 "${e}[${t};34m│     │${e}[33m│     │"
+                                          ~~~~
Unexpected token '${e}' in expression or statement.
At C:\Users\Tordenflesk\scoop\apps\winfetch\current\winfetch.ps1:468 char:47
+                 "${e}[${t};34m│     │${e}[33m│     │"
+                                               ~
Array index expression is missing or not valid.
At C:\Users\Tordenflesk\scoop\apps\winfetch\current\winfetch.ps1:468 char:47
+                 "${e}[${t};34m│     │${e}[33m│     │"
+                                               ~~~~~~~~~~~~~~~
Unexpected token '33m│     │"
                "${e}[${t};34m└─────┘${e}[33m└─────┘"
            )
        } else {
            Write-Error 'The' in expression or statement.
At C:\Users\Tordenflesk\scoop\apps\winfetch\current\winfetch.ps1:490 char:30
+             content = ('{0}[0;40m{1}{0}[0;41m{1}{0}[0;42m{1}{0}[0;43m ...
+                              ~
Missing ']' after array index expression.
Not all parse errors were reported.  Correct the reported errors and try again.
    + CategoryInfo          : ParserError: (:) [], ParentContainsErrorRecordException
    + FullyQualifiedErrorId : UnexpectedToken

2.3.0 works fine.

@rashil2000
Copy link
Member

@tordenflesk
Copy link
Author

tordenflesk commented May 1, 2022

Nope: https://i.imgur.com/aF2oyck.png

@ghost
Copy link

ghost commented May 2, 2022

Have similar issue with 2.4.0:
image
@rashil2000 can't change this settings, since I don't have admin access on this machine.

@rashil2000 rashil2000 reopened this May 2, 2022
@rashil2000
Copy link
Member

There is some discussion related to this in #132

Do you have any suggestions for pure ASCII small Microsoft logo?

@ghost
Copy link

ghost commented May 2, 2022

For me the easiest fix/workaround for Powershell 5.1 was to save winfetch.ps1 in UTF-8 with BOM instead of just UTF-8:

image

@rashil2000
Copy link
Member

rashil2000 commented May 2, 2022

Thanks for the idea!

@tordenflesk can you confirm if this works for you too?

@tordenflesk
Copy link
Author

Yes, UTF-8 BOM works:
https://i.imgur.com/1OZis9V.png

@rashil2000
Copy link
Member

Okay.

@astelmachonak-nydig would you like to make a PR?

@ghost
Copy link

ghost commented May 3, 2022

Yes, I will look into it tomorrow.

@ghost
Copy link

ghost commented May 3, 2022

@rashil2000 here you go #135

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

Successfully merging a pull request may close this issue.

2 participants