1
0
Fork 0
mirror of https://github.com/imjasonh/testscript-rs synced 2026-07-08 00:55:52 +00:00
testscript-rs/testdata/exec_path_change.txt
Jason Hall c39114f1a9 initial commit
Signed-off-by: Jason Hall <jason@chainguard.dev>
2025-09-26 18:41:14 -04:00

28 lines
533 B
Text

# If the PATH environment variable is set in the testscript.Params.Setup phase
# or set directly within a script, exec should honour that PATH
[!exec:go] skip
env HOME=$WORK${/}home
[windows] env USERPROFILE=$WORK\home
[windows] env LOCALAPPDATA=$WORK\appdata
cd go
exec go$exe version
stdout 'go version'
exec go$exe build
env PATH=$WORK${/}go${:}$PATH
exec go$exe version
stdout 'This is not go'
-- go/go.mod --
module example.com/go
-- go/main.go --
package main
import "fmt"
func main() {
fmt.Println("This is not go")
}