From 05decc863f4bc9d2e75bbaf48aad19fb3a2d732a Mon Sep 17 00:00:00 2001 From: Michael Vines Date: Fri, 7 Sep 2018 09:08:08 -0700 Subject: [PATCH] Make set -x more buildkite friendly --- .buildkite/hooks/pre-command | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.buildkite/hooks/pre-command b/.buildkite/hooks/pre-command index 57fa49f85..410c9bbfb 100644 --- a/.buildkite/hooks/pre-command +++ b/.buildkite/hooks/pre-command @@ -1,11 +1,14 @@ #!/bin/bash -e -[[ -n "$CARGO_TARGET_CACHE_NAME" ]] || exit 0 +# Ensure the pattern "+++ ..." never occurs when |set -x| is set, as buildkite +# interprets this as the start of a log group. +# Ref: https://buildkite.com/docs/pipelines/managing-log-output +export PS4="++" # # Restore target/ from the previous CI build on this machine # -( +[[ -n "$CARGO_TARGET_CACHE_NAME" ]] || ( d=$HOME/cargo-target-cache/"$CARGO_TARGET_CACHE_NAME" if [[ -d $d ]]; then @@ -21,3 +24,4 @@ set -x rsync -a --delete --link-dest="$d" "$d"/target . ) +