From 7d796d8a5ee4b9e2f50b249368622da36e3a9979 Mon Sep 17 00:00:00 2001 From: avcopan Date: Mon, 21 Oct 2024 20:15:13 -0500 Subject: [PATCH] Fix: Correctly handle -o argument for setting subtask run log --- scripts/subtasks.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/subtasks.sh b/scripts/subtasks.sh index 413977a..b227e78 100755 --- a/scripts/subtasks.sh +++ b/scripts/subtasks.sh @@ -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}