fix(canary): use heredoc for node script to avoid shell quoting issues

The double-quoted node -e broke on the \" inside the JS string.
Heredoc avoids all shell quoting problems.
This commit is contained in:
i-trytoohard 2026-05-17 17:14:11 +00:00
parent 843db0c11b
commit 4158cdbee2
1 changed files with 2 additions and 2 deletions

View File

@ -111,7 +111,7 @@ jobs:
# create a minimal one. `changeset version --snapshot` consumes and
# deletes it, so no cleanup is needed.
if [ -z "$(ls .changeset/*.md 2>/dev/null | grep -vi 'README')" ]; then
node -e "
node << 'SCRIPT'
const cfg = require('./.changeset/config.json');
const pkgs = cfg.linked.flat();
let body = '---
@ -123,7 +123,7 @@ jobs:
chore: canary build
';
require('fs').writeFileSync('.changeset/canary-temp.md', body);
"
SCRIPT
fi
pnpm changeset version --snapshot nightly
env: