fix(nsh_parse): handle env variables correctly

The PR #2469 broke handling of environment variables because an
error in the if/else if control flow.

This fixes it.
This commit is contained in:
Marco Casaroli 2024-08-10 13:08:10 +02:00 committed by Alan Carvalho de Assis
parent e46347ec1b
commit 0797ee2312

View File

@ -2734,7 +2734,8 @@ static int nsh_parse_command(FAR struct nsh_vtbl_s *vtbl, FAR char *cmdline)
argv[argc] = pbegin;
}
}
else if (!strncmp(argv[argc], g_redirect_out2, redirect_out2_len))
if (!strncmp(argv[argc], g_redirect_out2, redirect_out2_len))
{
FAR char *arg;
if (argv[argc][redirect_out2_len])