diff options
author | bpc2003 <wpesfriendnva@gmail.com> | 2025-05-26 20:23:03 -0400 |
---|---|---|
committer | bpc2003 <wpesfriendnva@gmail.com> | 2025-05-26 20:23:03 -0400 |
commit | 64c5bf8daf8b71b6efc2b4d2be34b179c8c87059 (patch) | |
tree | 26888ac0fd0518dcb7828396d9cb39c565ac06c0 /cmds/exit.go | |
parent | e7aa9e6e78f712d2db095af99813f669b1cefe15 (diff) |
Add numeric tests
Diffstat (limited to 'cmds/exit.go')
-rw-r--r-- | cmds/exit.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/cmds/exit.go b/cmds/exit.go index 5170b26..52f082a 100644 --- a/cmds/exit.go +++ b/cmds/exit.go @@ -4,12 +4,14 @@ import ( "errors" "os" "strconv" + + "gosh/global" ) // exit the shell and returns the provided status // if no status is specified returns 0 func exit(args []string) error { - status := 0 + status := global.ReturnCode if len(args) > 1 { var err error status, err = strconv.Atoi(args[1]) |