From 74e3e8ca236b83b972aca1453859354dae35109e Mon Sep 17 00:00:00 2001 From: Lukas Jiriste Date: Thu, 5 Sep 2024 09:42:20 +0200 Subject: [PATCH] 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. --- src/execute_raw.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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) { -- 2.30.2