JustinGrote / ModuleFast

A "fast and loose" way to install modules from Powershell Gallery quickly. Meant for CICD, not production
Other
77 stars 5 forks source link

Bootscript bit.ly/modulefastmain throws exception if not passing `-UseMain` #28

Closed johlju closed 8 months ago

johlju commented 8 months ago

If using the bootstrap link for testing main (passing -UseMain) works, but when removing -UseMain it fails with the following error. I was expecting it to replace the other bootstrap link when not using -UseMainbut that might not be the case?

PS> & ([scriptblock]::Create((iwr 'bit.ly/modulefastmain')))
: Exception calling "Create" with "1" argument(s): "At line:1 char:4
+ 35 114 101 113 117 105 114 101 115 32 45 118 101 114 115 105 111 110  …
+    ~~~
Unexpected token '114' in expression or statement.

At line:1 char:8
+ 35 114 101 113 117 105 114 101 115 32 45 118 101 114 115 105 111 110  …
+        ~~~
Unexpected token '101' in expression or statement.

At line:1 char:12
+ 35 114 101 113 117 105 114 101 115 32 45 118 101 114 115 105 111 110  …
+            ~~~
Unexpected token '113' in expression or statement.

At line:1 char:16
+ 35 114 101 113 117 105 114 101 115 32 45 118 101 114 115 105 111 110  …
+                ~~~
Unexpected token '117' in expression or statement.

At line:1 char:20
+ 35 114 101 113 117 105 114 101 115 32 45 118 101 114 115 105 111 110  …
+                    ~~~
Unexpected token '105' in expression or statement.

At line:1 char:24
+ 35 114 101 113 117 105 114 101 115 32 45 118 101 114 115 105 111 110  …
+                        ~~~
Unexpected token '114' in expression or statement.

At line:1 char:28
+ 35 114 101 113 117 105 114 101 115 32 45 118 101 114 115 105 111 110  …
+                            ~~~
Unexpected token '101' in expression or statement.

At line:1 char:32
+ 35 114 101 113 117 105 114 101 115 32 45 118 101 114 115 105 111 110  …
+                                ~~~
Unexpected token '115' in expression or statement.

At line:1 char:36
+ 35 114 101 113 117 105 114 101 115 32 45 118 101 114 115 105 111 110  …
+                                    ~~
Unexpected token '32' in expression or statement.

At line:1 char:39
+ 35 114 101 113 117 105 114 101 115 32 45 118 101 114 115 105 111 110  …
+                                       ~~
Unexpected token '45' in expression or statement.

Not all parse errors were reported.  Correct the reported errors and try again."
JustinGrote commented 8 months ago

I saw this earlier, it has to do with the nuget versioning load, don't recall how I fixed it but I'll investigate, thanks!

JustinGrote commented 8 months ago

Should be fixed, I switched to IWR and it was converting it to a byte array, not a string. Fixed: 5c798a8de7044978379da77fc031c12c55144fe0