Skip to content

Commit c07bda6

Browse files
author
udhos
committed
Force .go suffix on temp hello test.
1 parent 69262f5 commit c07bda6

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

update-golang.sh

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ perm_build_cache() {
311311
chown -R "$own" "$buildcache"
312312
}
313313

314-
test() {
314+
test_runhello() {
315315
local ret=1
316316
local t="$abs_gotool version"
317317
if [ "$abs_goroot" != $default_goroot ]; then
@@ -329,9 +329,10 @@ test() {
329329
msg "$t" FAIL
330330
fi
331331

332-
local hello=
333-
hello=$(mktemp -t hello-tmpXXXXXXXX.go)
334-
cat >"$hello" <<__EOF__
332+
local hello_tmp=
333+
hello_tmp=$(mktemp -t hello-tmpXXXXXXXX)".go"
334+
335+
cat >"$hello_tmp" <<__EOF__
335336
package main
336337
337338
import "fmt"
@@ -342,7 +343,7 @@ func main() {
342343
__EOF__
343344

344345
local abs_hello=
345-
abs_hello=$(solve "$hello")
346+
abs_hello=$(solve "$hello_tmp")
346347
ret=1
347348
t="$abs_gotool run $abs_hello"
348349
if [ "$abs_goroot" != $default_goroot ]; then
@@ -360,7 +361,7 @@ __EOF__
360361
msg "$t" FAIL
361362
fi
362363

363-
rm "$hello"
364+
rm "$hello_tmp"
364365
}
365366

366367
remove_golang() {
@@ -438,7 +439,7 @@ profile_path_add
438439

439440
msg golang "$label" installed at: "$abs_goroot"
440441

441-
test
442+
test_runhello
442443
if running_as_root; then
443444
msg running_as_root: yes
444445
perm_build_cache ;# must come after test, since testing might create root:root files

update-golang.sh.sha256

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
7cfc2df48ae1d93169d7f44966aa915da00d0bdfdb15115f491a71fb237ac147 update-golang.sh
1+
a758e8816a001897ab6f761c7eda99af8226569e47777d5c6e14042902e64904 update-golang.sh

0 commit comments

Comments
 (0)