urfave / gimme

MIT License
7 stars 3 forks source link

fix: Resolve version before checking arch #24

Closed abhinav closed 8 months ago

abhinav commented 10 months ago

Fixes a bug where gimme module reports the following error on macOS with ARM64.

error: arm64 is not supported by this go version
try go1.5 or newer

This occurs because the check for architecture is performed before the module version turns into a real version number with _resolve_version.

Fix by resolving version number before checking the architecture.

brackendawson commented 8 months ago

Also this needs to change, perhaps:

To install the release specified in the go.mod file, or the most recent patch when no patch version is present:

abhinav commented 8 months ago

Sounds good! Updated the arm64 version matching.

Agreed about the README change too. Should've done that in #25, but late is better than never. Updated to reflect new behavior.

brackendawson commented 8 months ago

New error message looks good but it still doesn't actually show up:

% uname -sm
Darwin arm64
% cat go.mod
module github.com/urfave/gimme/test

go 1.13
% ../gimme module
I don't have any idea what to do with '1.13.15'.
  (using download type 'auto')
abhinav commented 8 months ago

That's weird.

❯ uname -sm
Darwin arm64

❯ head -n3 go.mod
module github.com/urfave/gimme

go 1.13

❯ ./gimme module
error: arm64 is not supported by this go version
try go1.16 or newer