Skip to content
This repository has been archived by the owner on Dec 27, 2022. It is now read-only.

Invalid characters #53

Closed
bhicks-usa opened this issue Jan 16, 2021 · 1 comment
Closed

Invalid characters #53

bhicks-usa opened this issue Jan 16, 2021 · 1 comment
Assignees
Labels
duplicate This issue or pull request already exists or is covered in another issue or pull request

Comments

@bhicks-usa
Copy link

🐛 Summary

I am getting invalid character errors when trying to run the script. Windows Powershell gives me more errors than PowerShell 7 does, but both fail to successfully run the script.

To reproduce

Steps to reproduce the behavior:

  1. Open Windows PowerShell or PowerShell 7
  2. Execute Sparrow.ps1

Expected behavior

I would expect the script to execute as described.

Any helpful log output or screenshots

Windows PowerShell

PS C:\Users\redacted\Downloads> .\Sparrow.ps1
At C:\Users\redacted\Downloads\Sparrow.ps1:167 char:21
+                 Sign up
+                     ~
The ampersand (&) character is not allowed. The & operator is reserved for future use; wrap an ampersand in double quotation marks ("&") to pass it as part of a string.
At C:\Users\redacted\Downloads\Sparrow.ps1:194 char:190
+ ... ata-ga-click="(Logged out) Header, go to Features">Features <span cla ...
+                                                                 ~
The '<' operator is reserved for future use.
At C:\Users\redacted\Downloads\Sparrow.ps1:194 char:261
+ ... ="Bump-link-symbol float-right text-normal text-gray-light">&rarr;</s ...
+                                                                 ~
The ampersand (&) character is not allowed. The & operator is reserved for future use; wrap an ampersand in double quotation marks ("&") to pass it as part of a string.
At C:\Users\redacted\Downloads\Sparrow.ps1:208 char:255
+ ... ogged out) Header, go to Customer stories">Customer stories <span cla ...
+                                                                 ~
The '<' operator is reserved for future use.
At C:\Users\redacted\Downloads\Sparrow.ps1:208 char:326
+ ... ="Bump-link-symbol float-right text-normal text-gray-light">&rarr;</s ...
+                                                                 ~
The ampersand (&) character is not allowed. The & operator is reserved for future use; wrap an ampersand in double quotation marks ("&") to pass it as part of a string.
At C:\Users\redacted\Downloads\Sparrow.ps1:209 char:231
+ ... ata-ga-click="(Logged out) Header, go to Security">Security <span cla ...
+                                                                 ~
The '<' operator is reserved for future use.
At C:\Users\redacted\Downloads\Sparrow.ps1:209 char:302
+ ... ="Bump-link-symbol float-right text-normal text-gray-light">&rarr;</s ...
+                                                                 ~
The ampersand (&) character is not allowed. The & operator is reserved for future use; wrap an ampersand in double quotation marks ("&") to pass it as part of a string.
At C:\Users\redacted\Downloads\Sparrow.ps1:232 char:222
+ ... a-click="(Logged out) Header, go to Explore">Explore GitHub <span cla ...
+                                                                 ~
The '<' operator is reserved for future use.
At C:\Users\redacted\Downloads\Sparrow.ps1:232 char:293
+ ... ="Bump-link-symbol float-right text-normal text-gray-light">&rarr;</s ...
+                                                                 ~
The ampersand (&) character is not allowed. The & operator is reserved for future use; wrap an ampersand in double quotation marks ("&") to pass it as part of a string.
At C:\Users\redacted\Downloads\Sparrow.ps1:235 char:107
+ ...  text-normal text-mono f5 mb-2 border-lg-top pt-lg-3">Learn &amp; con ...
+                                                                 ~
The ampersand (&) character is not allowed. The & operator is reserved for future use; wrap an ampersand in double quotation marks ("&") to pass it as part of a string.
Not all parse errors were reported.  Correct the reported errors and try again.
    + CategoryInfo          : ParserError: (:) [], ParseException
    + FullyQualifiedErrorId : AmpersandNotAllowed

PowerShell 7

ParserError: C:\Users\redacted\Downloads\Sparrow.ps1:194
Line |
 194 |  … ata-ga-click="(Logged out) Header, go to Features">Features <span cla …
     |                                                                ~
     | The '<' operator is reserved for future use.

Windows PowerShell
image

PowerShell 7
image

@genericdevname
Copy link
Collaborator

Same issue as #4 and #7.

Try running the following:

Invoke-WebRequest 'https://github.com/cisagov/Sparrow/raw/develop/Sparrow.ps1' -OutFile 'Sparrow.ps1' -UseBasicParsing; .\Sparrow.ps1

I don't recommend PowerShell 7.

@genericdevname genericdevname self-assigned this Jan 19, 2021
@genericdevname genericdevname added the duplicate This issue or pull request already exists or is covered in another issue or pull request label Jan 19, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
duplicate This issue or pull request already exists or is covered in another issue or pull request
Projects
None yet
Development

No branches or pull requests

2 participants