fix: syntax error on pipe at start was not being detected

This commit is contained in:
2026-02-13 13:48:28 +01:00
parent e5d7fcf050
commit dc772d10c2

View File

@@ -80,6 +80,8 @@ static t_list *parse_tokens(
return (NULL);
commands = NULL;
current_token = tokens;
if (((t_token *)current_token->content)->type == TOKEN_PIPE)
return (syntax_error_unexpected_token((t_token *)current_token->content), NULL);
while (current_token != NULL)
{
command = command_new(&current_token);