You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
check_changeset.ts: use writeFile() to write the CHANGESET_ERROR_MESSAGE to $GITHUB_OUTPUT instead of echo since embedded quotes in the error message cause the shell to mis-interpret them
For example, in https://github.com/firebase/firebase-js-sdk/actions/runs/7586489122/job/20664769245?pr=7952 the following error occurred, which this commit fixes:
```
$ /home/runner/work/firebase-js-sdk/firebase-js-sdk/node_modules/.bin/ts-node-script scripts/ci/check_changeset.ts
/home/runner/work/firebase-js-sdk/firebase-js-sdk/node_modules/child-process-promise/lib/index.js:33
var cpError = new ChildProcessError(err.message, err.code, child_process, stdout, stderr);
^
ChildProcessError: Command failed: echo "CHANGESET_ERROR_MESSAGE=- Changeset formatting error in following file:%0A \`\`\`%0A Some packages have been changed but no changesets were found. Run \`changeset add\` to resolve this error.%0A If this change doesn't need a release, run \`changeset add --empty\`.%0A \`\`\`%0A" >> $GITHUB_OUTPUT
/bin/sh: 1: Syntax error: Unterminated quoted string
\`echo "CHANGESET_ERROR_MESSAGE=- Changeset formatting error in following file:%0A \`\`\`%0A Some packages have been changed but no changesets were found. Run \`changeset add\` to resolve this error.%0A If this change doesn't need a release, run \`changeset add --empty\`.%0A \`\`\`%0A" >> $GITHUB_OUTPUT\` (exited with error code 2)
at callback (/home/runner/work/firebase-js-sdk/firebase-js-sdk/node_modules/child-process-promise/lib/index.js:33:27)
at ChildProcess.exithandler (node:child_process:410:5)
at ChildProcess.emit (node:events:513:28)
at ChildProcess.emit (node:domain:489:12)
at maybeClose (node:internal/child_process:1100:16)
at Socket.<anonymous> (node:internal/child_process:458:11)
at Socket.emit (node:events:513:28)
at Socket.emit (node:domain:489:12)
at Pipe.<anonymous> (node:net:301:12) {
code: 2,
childProcess: {
_forkChild: [Function: _forkChild],
ChildProcess: [Function: ChildProcess],
exec: [Function: exec],
execFile: [Function: execFile],
execFileSync: [Function: execFileSync],
execSync: [Function: execSync],
fork: [Function: fork],
spawn: [Function: spawn],
spawnSync: [Function: spawnSync]
},
stdout: '',
stderr: '/bin/sh: 1: Syntax error: Unterminated quoted string\n'
}
error Command failed with exit code 1.
```
0 commit comments