Skip to content

Commit 57acfe8

Browse files
authored
Ensure newline after registry string in authutil
Add a newline at the end of the registry string in authutil, to ensure that it's a proper POSIX file.
1 parent 53b8394 commit 57acfe8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/authutil.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ function writeRegistryToFile(registryUrl: string, fileLocation: string) {
4343
const authString: string =
4444
registryUrl.replace(/(^\w+:|^)/, '') + ':_authToken=${NODE_AUTH_TOKEN}';
4545
const registryString = `${scope}registry=${registryUrl}`;
46-
newContents += `${authString}${os.EOL}${registryString}`;
46+
newContents += `${authString}${os.EOL}${registryString}${os.EOL}`;
4747
fs.writeFileSync(fileLocation, newContents);
4848
core.exportVariable('NPM_CONFIG_USERCONFIG', fileLocation);
4949
// Export empty node_auth_token if didn't exist so npm doesn't complain about not being able to find it

0 commit comments

Comments
 (0)