Skip to content

Commit

Permalink
Fix: Correctly handle -o argument for setting subtask run log
Browse files Browse the repository at this point in the history
  • Loading branch information
avcopan committed Oct 22, 2024
1 parent 9e401a8 commit 7d796d8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion scripts/subtasks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,19 @@
# All options and flags are passed along to the subtask runner.

SUBTASK_LOG="sub.log"
ARG_OFFSET=1
while getopts ":o:" opt; do
case $opt in
o)
SUBTASK_LOG=$OPTARG
ARG_OFFSET=$((ARG_OFFSET+2))
;;
esac
done

cd ${INIT_CWD:-$(pwd)}

COMMAND="automech subtasks run $@"
COMMAND="automech subtasks run ${@:ARG_OFFSET}"

# echo pixi run node ${@: -1} ${SUBTASK_LOG} ${COMMAND@Q}
pixi run node ${@: -1} ${SUBTASK_LOG} ${COMMAND@Q}

0 comments on commit 7d796d8

Please sign in to comment.