Skip to content

Commit

Permalink
fixed chaining execution attempting to execute operator
Browse files Browse the repository at this point in the history
  • Loading branch information
BanceDev committed Sep 27, 2024
1 parent 4028df2 commit b29a99b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/lush.c
Original file line number Diff line number Diff line change
Expand Up @@ -1186,9 +1186,12 @@ int lush_execute_chain(lua_State *L, char ***commands, int num_commands) {
continue;
}
}
if (commands[0] != NULL) {
// Run the command or move past the operator
if (commands[0] != NULL && !is_operator(commands[0][0])) {
last_result = run_command(L, commands);
commands += 2;
} else {
commands++;
}
}

Expand Down

0 comments on commit b29a99b

Please sign in to comment.