summaryrefslogtreecommitdiff
path: root/cmds/exit.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmds/exit.go')
-rw-r--r--cmds/exit.go4
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])