diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-08-15 18:25:16 +0200 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-08-15 18:25:16 +0200 |
commit | c5f54ee19c5c5f35fa073564d7790816f56b1057 (patch) | |
tree | bc40b96aa5db1334dc4bb33661e1d1e527e4477c /src | |
parent | Error handling ok (diff) | |
download | 42-minishell-c5f54ee19c5c5f35fa073564d7790816f56b1057.tar.gz 42-minishell-c5f54ee19c5c5f35fa073564d7790816f56b1057.tar.bz2 42-minishell-c5f54ee19c5c5f35fa073564d7790816f56b1057.tar.xz 42-minishell-c5f54ee19c5c5f35fa073564d7790816f56b1057.tar.zst 42-minishell-c5f54ee19c5c5f35fa073564d7790816f56b1057.zip |
Quick fix
Diffstat (limited to '')
-rw-r--r-- | src/e_externs.c | 2 | ||||
-rw-r--r-- | src/f_com.c | 3 | ||||
-rw-r--r-- | src/f_com.h | 2 |
3 files changed, 4 insertions, 3 deletions
diff --git a/src/e_externs.c b/src/e_externs.c index 554b3d1..46afb28 100644 --- a/src/e_externs.c +++ b/src/e_externs.c @@ -92,7 +92,7 @@ void ft_delwords(envpath); if (fullpath == NULL) { - f_fail_command_not_found(ptr->bin); + f_fail_command_not_found(ptr->bin, msh); } else { diff --git a/src/f_com.c b/src/f_com.c index 5ca03eb..7285205 100644 --- a/src/f_com.c +++ b/src/f_com.c @@ -17,8 +17,9 @@ #include "s_struct.h" void - f_fail_command_not_found(const char command[]) + f_fail_command_not_found(const char command[], t_msh *msh) { ft_dprintf(STDERR_FILENO, "%s: %s: %s\n", "minishell", command, FT_FAIL_COMMAND_NOT_FOUND); + msh->ret = 127; } diff --git a/src/f_com.h b/src/f_com.h index 12023f6..d7c46e1 100644 --- a/src/f_com.h +++ b/src/f_com.h @@ -15,6 +15,6 @@ #include "s_struct.h" -void f_fail_command_not_found(const char command[]); +void f_fail_command_not_found(const char command[], t_msh *msh); #endif |