Open sjfke opened 2 months ago
Current Windows installation instructions are incorrect, curl unsupported options
curl
$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
Invoke-RestMethod
Invoke-WebRequest
$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
Current Windows installation instructions are incorrect,
curl
unsupported optionsThe
curl
should be replaced withInvoke-RestMethod
and theInvoke-WebRequest
changedThe
Invoke-RestMethod
converts the response into a PowerShell object, so conversion from JSON is unnecessary