Closed marimlem closed 2 months ago
bash$ exit abc
exit
bash: exit: abc: numeric argument required
=> EXITS
bash$ exit abc 1
exit
bash: exit: abc: numeric argument required
=> EXITS
bash$ exit 1 2 3
exit
bash: exit: too many arguments
=> DOESN'T EXIT
fixed exit bug, exits with ec = 2 when numeric argument is required and does not exit when too many arguments, also added check for "-" for exit input, will push later with other changes on "piscine-week-fix-hao"
exit 1 2
NOT OK
minishell:$ exit 1 2
exit minishell
exit: too many arguments
minishell: exit: too many arguments
exit abc
OK
minishell:
in errormessageexit a b
OK
minishell:
in errormessagefixed exit