From: Lukas Jiriste Date: Thu, 5 Sep 2024 07:42:20 +0000 (+0200) Subject: Change handling of invalid command X-Git-Url: https://git.ljiriste.work/?a=commitdiff_plain;h=74e3e8ca236b83b972aca1453859354dae35109e;p=42%2Fminishell.git Change handling of invalid command Before it made execution fail which made || not function properly. Now invalid command makes the execution chain not fail. An error message was also added. --- diff --git a/src/execute_raw.c b/src/execute_raw.c index 6b01f1e..8be11b8 100644 --- a/src/execute_raw.c +++ b/src/execute_raw.c @@ -6,7 +6,7 @@ /* By: lnikolov ret_val = 127; + } return (path); } @@ -73,7 +76,7 @@ int ex_fields(char **fields, t_vec *assignments, return (ex_builtin(fields, assignments, redirections, env)); path = get_path(fields[0], env); if (!path) - return (1); + return (0); pid = fork(); if (pid == 0) {