Skip to content

Commit 7cca7d2

Browse files
committed
Don't print the exact same warning twice
In the step output, the warning that produces a workflow annotation is fully readable (and even made to stand out), so it doesn't need to be printed in the plain way as well, which can be reserved for when GitHub Actions is not detected.
1 parent b98f15e commit 7cca7d2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: init-tests-after-clone.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ no_version_tags() {
1414
}
1515

1616
warn() {
17-
printf '%s\n' "$@" >&2 # Warn in step output.
18-
1917
if test -n "${GITHUB_ACTIONS-}"; then
2018
printf '::warning ::%s\n' "$*" >&2 # Annotate workflow.
19+
else
20+
printf '%s\n' "$@" >&2
2121
fi
2222
}
2323

0 commit comments

Comments
 (0)