File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -208,13 +208,13 @@ go_version_ok() {
208208
209209go_os_arch () {
210210 local os arch
211- os=" $( uname -s) "
211+ os=" $( uname -s 2> /dev/null | tr -d ' \r ' | xargs ) " || return 1
212212 case " ${os} " in
213213 Darwin) os=" darwin" ;;
214214 Linux) os=" linux" ;;
215215 * ) return 1 ;;
216216 esac
217- arch=" $( uname -m) "
217+ arch=" $( uname -m 2> /dev/null | tr -d ' \r ' | xargs ) " || return 1
218218 case " ${arch} " in
219219 x86_64|amd64) arch=" amd64" ;;
220220 aarch64|arm64) arch=" arm64" ;;
@@ -242,7 +242,7 @@ install_go_tarball() {
242242 ensure_sudo
243243
244244 local os arch tmp json_file info_file filename sha url actual
245- read -r os arch < <( go_os_arch) || err " Unsupported OS/arch for Go install."
245+ read -r os arch < <( go_os_arch) || err " Unsupported OS/arch for Go install (expected darwin/linux + amd64/arm64) ."
246246
247247 tmp=" $( mktemp -d) "
248248 json_file=" ${tmp} /go.json"
You can’t perform that action at this time.
0 commit comments