From 10ffff68d927d337a12bff15e7b3b5b559f1251c Mon Sep 17 00:00:00 2001 From: vctrubio Date: Sat, 25 Feb 2023 12:23:44 +0100 Subject: [PATCH] note cd src is being ran twice --- srcs/piping.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/srcs/piping.c b/srcs/piping.c index 11c4281..2ec9007 100755 --- a/srcs/piping.c +++ b/srcs/piping.c @@ -33,7 +33,7 @@ int run_if_first_level_builtins_set_path(t_cmd **curr, char **path, i[3] = 0; if (*path) free(*path); - if (check_if_builtin_not_pipe((*curr))) + if (check_if_builtin_not_pipe((*curr))) //PROBLEM HERE PROP _shell()->exit_code = run_builtin((*curr)); *path = ft_get_exec_path((*curr)->args); if (*path && access(*path, X_OK) != 0) @@ -109,3 +109,7 @@ void pipe_commands(t_cmd *cmd) } pipe_commands_cleanup(i[2], pipes, path); } + + +//cd srcs +//-> cd is being ran twice man, cd srcs (success) cd srcs (failure becasue chdir has occured.)