Skip to content

Commit ce301bf

Browse files
committed
CI: fix tests.yml yaml parse error in yarn-berry setup heredoc
The previous commit's inline heredoc put @echo off at column 1, which YAML tries to parse as the start of a token @ is a reserved indicator). GitHub Actions rejected the whole workflow as malformed, making every test job skip. Replace the heredoc with a single printf call that keeps the body inside the YAML block-scalar's indentation — functionally equivalent but parseable.
1 parent 084599b commit ce301bf

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

.github/workflows/tests.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -179,11 +179,10 @@ jobs:
179179
echo "$YARN_BERRY_ALIAS_DIR" >> "$GITHUB_PATH"
180180
npm install --prefix "$YARN_BERRY_PREFIX" @yarnpkg/cli-dist@4.13.0
181181
# Emit a one-line ``yarn-berry.cmd`` that forwards to npm-installed
182-
# ``yarn.cmd``. Use ``%*`` to pass through all args.
183-
cat > "$YARN_BERRY_ALIAS_DIR/yarn-berry.cmd" <<EOF
184-
@echo off
185-
"$YARN_BERRY_PREFIX\\node_modules\\.bin\\yarn.cmd" %*
186-
EOF
182+
# ``yarn.cmd``. Use ``%*`` to pass through all args. Built with
183+
# printf so the heredoc body doesn't collide with YAML block-scalar
184+
# indentation.
185+
printf '@echo off\n"%s\\node_modules\\.bin\\yarn.cmd" %%*\n' "$YARN_BERRY_PREFIX" > "$YARN_BERRY_ALIAS_DIR/yarn-berry.cmd"
187186
export PATH="$YARN_BERRY_ALIAS_DIR:$PATH"
188187
command -v yarn-berry
189188
yarn-berry --version | grep -q '^4\.'

0 commit comments

Comments
 (0)