open-policy-agent / vscode-opa

An extension for VS Code which provides support for OPA and the Rego policy language
https://openpolicyagent.org
Apache License 2.0
111 stars 31 forks source link

Check for OS architecture when installing OPA CLI #216

Closed tjons closed 2 months ago

tjons commented 2 months ago

When installing the extension in VS Code and proceeding with the prompt to install the OPA CLI binary, I noticed that the amd64 version was installed on my arm64 macbook:

Screenshot 2024-07-10 at 10 31 35 PM

This PR fixes that and ensures that the binary selected from the assets matches the platform architecture of the machine.

Screenshot 2024-07-10 at 10 27 04 PM
charlieegan3 commented 2 months ago

Thanks for working on this Tyler, I've tested and it works for me here. Other than addressing the windows arm case with an error, I think we're good here.

tjons commented 2 months ago

@charlieegan3 @anderseknert great catch! Here's what it will look like on windows arm:

Screenshot 2024-07-12 at 6 44 07 AM
charlieegan3 commented 2 months ago

Thanks for making this adjustment Tyler 🙏, looks great to me.