fix: exit code
This commit is contained in:
parent
b3d060874d
commit
22dc9776d6
Binary file not shown.
2
env/env_fill.c
vendored
2
env/env_fill.c
vendored
@ -22,7 +22,7 @@ static char *ft_getkey(const char *str)
|
||||
key = ft_strdup("$");
|
||||
else if (ft_strncmp(str, "$?", 2) == 0)
|
||||
key = ft_strdup("?");
|
||||
if (str[1] == '\0')
|
||||
else if (str[1] == '\0')
|
||||
key = ft_strdup("");
|
||||
else
|
||||
{
|
||||
|
@ -38,6 +38,7 @@ static int ft_own_cmd(t_data *data, t_cmd *cmd)
|
||||
return (-1);
|
||||
}
|
||||
}
|
||||
data->exit_code = return_code;
|
||||
return (return_code);
|
||||
}
|
||||
|
||||
|
@ -102,8 +102,9 @@ static int ft_empty_verif(const char *str)
|
||||
|
||||
int ft_syntax_verif(t_data *data, const char *str)
|
||||
{
|
||||
if (ft_empty_verif(str))
|
||||
return (1);
|
||||
if (ft_quote_verif(str)
|
||||
|| ft_empty_verif(str)
|
||||
|| ft_pipe_is_alone(str)
|
||||
|| ft_special_char_dub(str))
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user