Ensure newline after registry string in npmrc by laat · Pull Request #1503 · actions/setup-node
Add a newline at the end of the registry string in authutil, to ensure that it's a proper POSIX text file.
Description:
Had to add the newline myself, when adding more registries to npmrc.
- name: Use Node.js 24.14.x
uses: actions/setup-node@v6
with:
node-version: 24.14.x
cache: 'pnpm'
registry-url: 'https://registry.npmjs.org'
- name: 'add bigcorp repo to .npmrc'
run: |
echo "" >> ${NPM_CONFIG_USERCONFIG} # <---- workaround for this bug
echo "//npm.bigcorp.org/:_authToken=${NPM_TOKEN}" >> ${NPM_CONFIG_USERCONFIG}
echo "@bigcorp:registry=https://npm.bigcorp.org/" >> ${NPM_CONFIG_USERCONFIG}
shell: bash
env:
NPM_TOKEN: ${{ inputs.BIG_CORP_TOKEN }}
Related issue:
Add link to the related issue.
Check list:
- Mark if documentation changes are required.
- Mark if tests were added or updated to cover the changes.