Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows installation instructions do not work #404

Open
sjfke opened this issue Apr 26, 2024 · 1 comment
Open

Windows installation instructions do not work #404

sjfke opened this issue Apr 26, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@sjfke
Copy link

sjfke commented Apr 26, 2024

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 sjfke added the bug Something isn't working label Apr 26, 2024
@TomWright
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants