File tree 2 files changed +18
-5
lines changed
2 files changed +18
-5
lines changed Original file line number Diff line number Diff line change @@ -59,14 +59,17 @@ selected, not necessarily `1.14.patch`.
59
59
The ` ASDF_GOLANG_OVERWRITE_ARCH ` variable can be used to override the architecture
60
60
that is used for determining which Go build to download. The primary use case is when attempting
61
61
to install an older version of Go for use on an Apple M1 computer as Go was not being built for ARM at the time.
62
+
62
63
#### Without ASDF_GOLANG_OVERWRITE_ARCH
64
+
63
65
```
64
66
> asdf install golang 1.15.8
65
67
Platform 'darwin' supported!
66
68
URL: https://dl.google.com/go/go1.15.8.darwin-arm64.tar.gz returned status 404
67
69
```
68
70
69
71
#### With ASDF_GOLANG_OVERWRITE_ARCH
72
+
70
73
```
71
74
> ASDF_GOLANG_OVERWRITE_ARCH=amd64 asdf install golang 1.15.8
72
75
Platform 'darwin' supported!
@@ -78,6 +81,11 @@ verifying checksum
78
81
checksum verified
79
82
```
80
83
84
+ ## Skipping Checksums
85
+
86
+ By default we try to verify the checksum of each install but ocassionally [ that's not possible] ( https://github.com/kennyp/asdf-golang/issues/91 ) .
87
+ If you need to skip the checksum for some reason just set ` ASDF_GOLANG_SKIP_CHECKSUM ` .
88
+
81
89
## Contributing
82
90
83
91
Feel free to create an issue or pull request if you find a bug.
Original file line number Diff line number Diff line change @@ -42,13 +42,18 @@ download_golang () {
42
42
fi
43
43
44
44
curl " $download_url " -o " ${download_path} /archive.tar.gz"
45
- curl " ${download_url} .sha256" -o " ${download_path} /archive.tar.gz.sha256"
46
45
47
- echo ' verifying checksum'
48
- if ! check_shasum " ${download_path} /archive.tar.gz" " ${download_path} /archive.tar.gz.sha256" ; then
49
- fail " Authenticity of package archive can not be assured. Exiting."
46
+ if [ " unset" = " ${ASDF_GOLANG_SKIP_CHECKSUM:- unset} " ]; then
47
+ curl " ${download_url} .sha256" -o " ${download_path} /archive.tar.gz.sha256"
48
+
49
+ echo ' verifying checksum'
50
+ if ! check_shasum " ${download_path} /archive.tar.gz" " ${download_path} /archive.tar.gz.sha256" ; then
51
+ fail " Authenticity of package archive can not be assured. Exiting."
52
+ else
53
+ msg " checksum verified"
54
+ fi
50
55
else
51
- msg " checksum verified "
56
+ err " checksum skipped "
52
57
fi
53
58
}
54
59
You can’t perform that action at this time.
0 commit comments