diff --git a/.nfs00000000098c816100000162 b/.nfs00000000098c8161000001bf similarity index 73% rename from .nfs00000000098c816100000162 rename to .nfs00000000098c8161000001bf index ec49366..2041364 100755 Binary files a/.nfs00000000098c816100000162 and b/.nfs00000000098c8161000001bf differ diff --git a/env/env_fill.c b/env/env_fill.c index eb64c42..d8cfc10 100644 --- a/env/env_fill.c +++ b/env/env_fill.c @@ -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 { diff --git a/execution/execution.c b/execution/execution.c index 2822115..fa16ddf 100644 --- a/execution/execution.c +++ b/execution/execution.c @@ -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); } diff --git a/syntax/syntax.c b/syntax/syntax.c index 4366c21..3875582 100644 --- a/syntax/syntax.c +++ b/syntax/syntax.c @@ -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)) {