Skip to content

Commit

Permalink
Fix non existing tee output
Browse files Browse the repository at this point in the history
  • Loading branch information
Félix Piédallu committed Oct 28, 2024
1 parent 54abb7b commit f50a185
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/lxc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -164,9 +164,13 @@ LXC_EXEC () {
start_timer

# Execute the command given in argument in the container and log its results.
: "${full_log:=}"
logfiles=("${full_log:-}")
if [[ -n "${current_test_log:-}" ]]; then
logfiles+=("$current_test_log")
fi

: "${current_test_log:=}"
$lxc exec "$LXC_NAME" --env PACKAGE_CHECK_EXEC=1 -t -- /bin/bash -c "$cmd" | tee -a "$full_log" "$current_test_log"
$lxc exec "$LXC_NAME" --env PACKAGE_CHECK_EXEC=1 -t -- /bin/bash -c "$cmd" | tee -a "${logfiles[@]}"

# Store the return code of the command
local returncode=${PIPESTATUS[0]}
Expand Down

0 comments on commit f50a185

Please sign in to comment.