From 64c5bf8daf8b71b6efc2b4d2be34b179c8c87059 Mon Sep 17 00:00:00 2001 From: bpc2003 Date: Mon, 26 May 2025 20:23:03 -0400 Subject: Add numeric tests --- cmds/exit.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'cmds/exit.go') 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]) -- cgit v1.2.3