Skip to content

Commit

Permalink
Merge pull request #1757 from xushiwei/q
Browse files Browse the repository at this point in the history
gsh: exec
  • Loading branch information
xushiwei committed Feb 19, 2024
2 parents 271d98e + 23917a4 commit f380cf9
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,3 @@ go-num/
_todo*.go

dist/
gsh-exec/
5 changes: 5 additions & 0 deletions testdata/gsh-exec/exec.gsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
gop "run", "./foo"
exec "gop run ./foo"
exec "FOO=100 gop run ./foo"
exec {"FOO": "101"}, "gop", "run", "./foo"
exec "gop", "run", "./foo"
8 changes: 8 additions & 0 deletions testdata/gsh-exec/foo/foo.gop
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import "os"

foo := os.getenv("FOO")
if foo != "" {
echo foo
} else {
echo "FOO not found"
}

0 comments on commit f380cf9

Please sign in to comment.