fix exit quand output ambiguous redirect

This commit is contained in:
tom moron
2024-05-05 20:07:53 +02:00
parent 257e4829ba
commit b45a04e622

View File

@ -6,7 +6,7 @@
/* By: tomoron <marvin@42.fr> +#+ +:+ +#+ */ /* By: tomoron <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2024/04/19 14:09:44 by tomoron #+# #+# */ /* Created: 2024/04/19 14:09:44 by tomoron #+# #+# */
/* Updated: 2024/05/03 14:07:43 by marde-vr ### ########.fr */ /* Updated: 2024/05/05 20:06:43 by tomoron ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
@ -71,7 +71,10 @@ void get_out_file(t_msh *msh, t_cmd *cur_cmd, int *ret)
msh->out_type = cur_cmd->cmd_type; msh->out_type = cur_cmd->cmd_type;
if (ft_strchr(cur_cmd->value, '$')) if (ft_strchr(cur_cmd->value, '$'))
{
ambiguous_redirect(cur_cmd->value, msh); ambiguous_redirect(cur_cmd->value, msh);
return ;
}
filename = parse_tokens(cur_cmd->value, msh->env); filename = parse_tokens(cur_cmd->value, msh->env);
if (!filename) if (!filename)
ft_exit(msh, 1); ft_exit(msh, 1);