Skip to content
This repository was archived by the owner on Jan 22, 2025. It is now read-only.

Commit 58013c2

Browse files
committed
Use folding heredoc giving up proper indenting..
1 parent 652df19 commit 58013c2

File tree

1 file changed

+4
-11
lines changed

1 file changed

+4
-11
lines changed

scripts/check-dev-utils.sh

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -77,12 +77,9 @@ EOF
7777

7878
abusers="$(_ cargo "+${rust_nightly}" metadata --format-version=1 | jq -r "$query")"
7979
if [[ -n "$abusers" ]]; then
80-
# Fold message for heredoc while stripping white-spaces by echo
81-
# shellcheck disable=SC2116
82-
error="$(echo "${dev_utils_feature}" must not be used as normal dependencies, \
83-
but is by "([crate]: [dependency])")"
8480
cat <<EOF 1>&2
85-
$error:
81+
${dev_utils_feature} must not be used as normal dependencies, but is by \
82+
"([crate]: [dependency])":
8683
$abusers
8784
EOF
8885
exit 1
@@ -126,13 +123,9 @@ EOF
126123
| jq -r "$query"
127124
)
128125
if [[ -n "$misconfigured_crates" ]]; then
129-
# Fold message for heredoc while stripping white-spaces by echo
130-
# shellcheck disable=SC2116
131-
error="$(echo All crates marked \`tainted\', as well as their \
132-
dependents, MUST declare the \`${dev_utils_feature}\`. The \
133-
following crates are in violation)"
134126
cat <<EOF 1>&2
135-
$error:
127+
All crates marked \`tainted\`, as well as their dependents, MUST declare the \
128+
\`$dev_utils_feature\`. The following crates are in violation:
136129
$misconfigured_crates
137130
EOF
138131
exit 1

0 commit comments

Comments
 (0)