mirror of
https://codeberg.org/la-chouette/minishell.git
synced 2025-12-06 07:28:09 +01:00
feat(postprocess): show error when post-processing failure occurs
This commit is contained in:
parent
2180909285
commit
ac198727e9
1 changed files with 7 additions and 1 deletions
|
|
@ -6,10 +6,11 @@
|
|||
/* By: khais <marvin@42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2025/03/27 16:21:56 by khais #+# #+# */
|
||||
/* Updated: 2025/04/22 13:14:33 by khais ### ########.fr */
|
||||
/* Updated: 2025/04/22 15:38:00 by khais ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include "../../ft_errno.h"
|
||||
#include "simple_cmd_execute.h"
|
||||
#include "builtins.h"
|
||||
#include "subprocess.h"
|
||||
|
|
@ -79,8 +80,13 @@ void simple_cmd_execute(t_simple_cmd *cmd, t_minishell *app,
|
|||
{
|
||||
if (cmd == NULL || cmd->words == NULL || cmd->words->word == NULL)
|
||||
return ;
|
||||
ft_errno(FT_ESUCCESS);
|
||||
if (post_process_command(cmd, app) == NULL)
|
||||
{
|
||||
if (ft_errno_get() != FT_ESUCCESS)
|
||||
ft_dprintf(STDERR_FILENO, "minishell: post-processing error\n");
|
||||
return ;
|
||||
}
|
||||
simple_cmd_execute_debug(cmd, app);
|
||||
if (handle_redirections(cmd, app) == NULL)
|
||||
return ;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue