Skip to content

Commit

Permalink
fix: unshift redirection instead of push
Browse files Browse the repository at this point in the history
  • Loading branch information
Huy-DNA committed Nov 12, 2024
1 parent af42ba2 commit fae0db0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/command/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ function extractShellRedirection (...args: string[]): Result<{
const mode = arg === '>' ? RedirectionMode.Output : RedirectionMode.Append;
const pathname = args[i + 1];
if (pathname === undefined) return new Err([`Parse error: no pathname found after '${arg}'`]);
redirections.push({ mode, name: pathname });
redirections.unshift({ mode, name: pathname });
args.splice(i, 2);
}
}
Expand Down

0 comments on commit fae0db0

Please sign in to comment.