Problem running the Powershell version of fetch-configlet

I’m getting this both in Ubuntu and Windows 11

bin$ pwsh ./fetch-configlet.ps1
Invoke-WebRequest: /mnt/c/Users/bugma/Source/Repos/3rdParty/euphoria/bin/fetch-configlet.ps1:29
Line |
  29 |  Invoke-WebRequest -Uri $downloadUrl -OutFile $outputFile @requestOpts
     |                         ~~~~~~~~~~~~
     | Cannot validate argument on parameter 'Uri'. The argument is null or
     | empty. Provide an argument that is not null or empty, and then try
     | the command again.

Is something out of date here?

The upstream fetch-configlet.ps1 script is one commit ahead of the one in the euphoria track repo. Could you please confirm whether the error still occurs with the upstream version?

The error looks different, so it might be an independent issue. I’m not a PowerShell user, so this would be one for Erik. Either way, we’re probably overdue for resyncing the track repo PowerShell scripts with upstream.

I’ve opened fetch-configlet.ps1: "Cannot validate argument" error · Issue #839 · exercism/configlet · GitHub

I’ve created a PR to fix this: Fix powershell script by ErikSchierboom · Pull Request #841 · exercism/configlet · GitHub

@axtens Could you check if the version defined in Fix powershell script by ErikSchierboom · Pull Request #841 · exercism/configlet · GitHub (so that’s https://github.com/exercism/configlet/blob/b64c05a12eca206c8fdfc1528e4098c48cde7e90/scripts/fetch-configlet.ps1) works for you?

Yes. Works a treat.

C:\Users\bugma\Source\Repos\3rdParty\euphoria>pwsh bin\fetch-configlet.ps1
Fetching configlet...
Downloaded configlet 4.0.0-beta.16 to bin\configlet.exe

C:\Users\bugma\Source\Repos\3rdParty\euphoria>dir bin
 Volume in drive C is OS
 Volume Serial Number is 14F0-1FA8

 Directory of C:\Users\bugma\Source\Repos\3rdParty\euphoria\bin

12/12/2023  05:10 PM    <DIR>          .
27/11/2023  04:14 PM    <DIR>          ..
20/10/2023  10:10 AM           630,272 configlet.exe
25/11/2023  11:45 PM             2,288 fetch-configlet
12/12/2023  05:09 PM             1,857 fetch-configlet.ps1
25/11/2023  11:45 PM             1,768 run.ex
25/11/2023  11:45 PM             1,292 verify-exercises
               5 File(s)        637,477 bytes

I can’t approve the PR for some reason, if that’s what you’re waiting for.

No I’m not, I just forgot :man_shrugging: