Skip to content

Commit

Permalink
fix(nsh_parse): handle env variables correctly
Browse files Browse the repository at this point in the history
The PR #2469 broke handling of environment variables because an
error in the if/else if control flow.

This fixes it.
  • Loading branch information
casaroli authored and acassis committed Aug 10, 2024
1 parent e46347e commit 0797ee2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion nshlib/nsh_parse.c
Original file line number Diff line number Diff line change
Expand Up @@ -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])
Expand Down

0 comments on commit 0797ee2

Please sign in to comment.