mirror of
https://codeberg.org/la-chouette/minishell.git
synced 2025-12-06 07:28:09 +01:00
feat(redirections): allow a command composed only of redirections
This commit is contained in:
parent
a9055b4c66
commit
92d647e33c
8 changed files with 58 additions and 17 deletions
|
|
@ -6,7 +6,7 @@
|
|||
/* By: khais <marvin@42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2025/03/27 16:21:56 by khais #+# #+# */
|
||||
/* Updated: 2025/04/28 12:48:38 by khais ### ########.fr */
|
||||
/* Updated: 2025/04/28 14:42:13 by khais ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
|
@ -78,6 +78,8 @@ static void exec_external_cmd(t_simple_cmd *cmd, t_minishell *app,
|
|||
char *exe;
|
||||
int pid;
|
||||
|
||||
if (cmd->words == NULL)
|
||||
return (restore_std_fds(fds));
|
||||
exe = get_cmdpath(cmd->words->word->word, app);
|
||||
if (exe == NULL)
|
||||
return (command_not_found(cmd, app));
|
||||
|
|
@ -94,7 +96,7 @@ void simple_cmd_execute(t_simple_cmd *cmd, t_minishell *app,
|
|||
{
|
||||
t_std_fds fds;
|
||||
|
||||
if (cmd == NULL || cmd->words == NULL || cmd->words->word == NULL)
|
||||
if (cmd == NULL)
|
||||
return ;
|
||||
ft_errno(FT_ESUCCESS);
|
||||
if (post_process_command(cmd, app) == NULL)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue