dasel
dasel copied to clipboard
Windows installation instructions do not work
Current Windows installation instructions are incorrect, curl unsupported options
$releases = curl -sSLf https://api.github.com/repos/tomwright/dasel/releases/latest
Invoke-WebRequest -Uri (($releases | ConvertFrom-Json).assets `
| Where-Object { $_.name -eq "dasel_windows_amd64.exe" } `
| Select-Object -ExpandProperty browser_download_url) `
-OutFile dasel.exe
The curl should be replaced with Invoke-RestMethod and the Invoke-WebRequest changed
$releases = Invoke-RestMethod -Uri https://api.github.com/repos/tomwright/dasel/releases/latest
Invoke-WebRequest -Uri ( $releases.assets `
| Where-Object { $_.name -eq "dasel_windows_amd64.exe" } `
| Select-Object -ExpandProperty browser_download_url ) `
-OutFile dasel.exe
The Invoke-RestMethod converts the response into a PowerShell object, so conversion from JSON is unnecessary
Could you raise a PR for this please? I don't use Windows so am unable to test