File tree Expand file tree Collapse file tree 2 files changed +9
-8
lines changed Expand file tree Collapse file tree 2 files changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -311,7 +311,7 @@ perm_build_cache() {
311
311
chown -R " $own " " $buildcache "
312
312
}
313
313
314
- test () {
314
+ test_runhello () {
315
315
local ret=1
316
316
local t=" $abs_gotool version"
317
317
if [ " $abs_goroot " != $default_goroot ]; then
@@ -329,9 +329,10 @@ test() {
329
329
msg " $t " FAIL
330
330
fi
331
331
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__
335
336
package main
336
337
337
338
import "fmt"
@@ -342,7 +343,7 @@ func main() {
342
343
__EOF__
343
344
344
345
local abs_hello=
345
- abs_hello=$( solve " $hello " )
346
+ abs_hello=$( solve " $hello_tmp " )
346
347
ret=1
347
348
t=" $abs_gotool run $abs_hello "
348
349
if [ " $abs_goroot " != $default_goroot ]; then
@@ -360,7 +361,7 @@ __EOF__
360
361
msg " $t " FAIL
361
362
fi
362
363
363
- rm " $hello "
364
+ rm " $hello_tmp "
364
365
}
365
366
366
367
remove_golang () {
@@ -438,7 +439,7 @@ profile_path_add
438
439
439
440
msg golang " $label " installed at: " $abs_goroot "
440
441
441
- test
442
+ test_runhello
442
443
if running_as_root; then
443
444
msg running_as_root: yes
444
445
perm_build_cache ; # must come after test, since testing might create root:root files
Original file line number Diff line number Diff line change 1
- 7cfc2df48ae1d93169d7f44966aa915da00d0bdfdb15115f491a71fb237ac147 update-golang.sh
1
+ a758e8816a001897ab6f761c7eda99af8226569e47777d5c6e14042902e64904 update-golang.sh
You can’t perform that action at this time.
0 commit comments