dasel icon indicating copy to clipboard operation
dasel copied to clipboard

Windows installation instructions do not work

Open sjfke opened this issue 1 year ago • 1 comments

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

sjfke avatar Apr 26 '24 10:04 sjfke

Could you raise a PR for this please? I don't use Windows so am unable to test

TomWright avatar Apr 26 '24 19:04 TomWright