mvdan / sh

A shell parser, formatter, and interpreter with bash support; includes shfmt
https://pkg.go.dev/mvdan.cc/sh/v3
BSD 3-Clause "New" or "Revised" License
7.1k stars 336 forks source link

No installation for mac M1 virtual machine - windows_arm64 #920

Closed magedhelmy1 closed 1 year ago

magedhelmy1 commented 1 year ago

Has anyone managed to use this on a macOS?

I get the following error

shfmt hasn't downloaded yet!Error: ENOENT: no such file or directory, stat 'c:\Users\magedhelmy\.vscode\extensions\foxundermoon.shell-format-7.2.2\bin\shfmt_v3.3.1_windows_arm64.exe'
Shfmt will be downloaded automatically!
download url: https://github.com/mvdan/sh/releases/download/v3.3.1/shfmt_v3.3.1_windows_arm64.exe
download to: c:\Users\magedhelmy\.vscode\extensions\foxundermoon.shell-format-7.2.2\bin\shfmt_v3.3.1_windows_arm64.exe
If the download fails, you can manually download it to the dest directory.
Or download to another directory, and then set the "shellformat.path" as the path
download shfmt page: https://github.com/mvdan/sh/releases
You can't use this plugin until the download is successful.
download failed: Error: HTTP status 404 : Not Found

Is there a plan to have a version for arm64? Thank you.

mvdan commented 1 year ago

We have provided darwin arm64 binaries for a while now, e.g. see https://github.com/mvdan/sh/releases/download/v3.5.1/shfmt_v3.5.1_darwin_arm64.

magedhelmy1 commented 1 year ago

Hi Mvdan, can you please share the instructions for setting this up on windows?

mvdan commented 1 year ago

Right, you said windows, not mac.

We only provide some binaries, right now for all of Go's first class ports, mimicking upstream Go per https://github.com/golang/go/wiki/PortingPolicy#first-class-ports. windows/arm64 is not a first class port yet; see https://github.com/golang/go/issues/53541. Anyone can still install the tool from source with Go like the README says.

You also appear to be using https://github.com/foxundermoon/vs-shell-format, so I would suggest to ask them. The error is not from us.

magedhelmy1 commented 1 year ago

Great, thanks for your time Daniel!