diff --git a/dist/index.js b/dist/index.js index 98ffaa51..4932865c 100644 --- a/dist/index.js +++ b/dist/index.js @@ -4778,7 +4778,7 @@ function writeRegistryToFile(registryUrl, fileLocation, alwaysAuth) { const alwaysAuthString = `always-auth=${alwaysAuth}`; if (scope && includeBothRegistries === "true") { const registryStringNoScope = `registry=${registryUrl}`; - newContents += `${authString}${os.EOL}${registryString}${os.EOL}${registryStringNoScope}${os.EOL}${alwaysAuthString}`; + newContents += `${registryStringNoScope}${os.EOL}${registryString}${os.EOL}${alwaysAuthString}${os.EOL}${authString}`; } else { newContents += `${authString}${os.EOL}${registryString}${os.EOL}${alwaysAuthString}`; diff --git a/src/authutil.ts b/src/authutil.ts index 93c959c9..d433bf90 100644 --- a/src/authutil.ts +++ b/src/authutil.ts @@ -102,7 +102,7 @@ async function writeRegistryToFile( const alwaysAuthString: string = `always-auth=${alwaysAuth}`; if(scope && includeBothRegistries === "true") { const registryStringNoScope = `registry=${registryUrl}`; - newContents += `${authString}${os.EOL}${registryString}${os.EOL}${registryStringNoScope}${os.EOL}${alwaysAuthString}`; + newContents += `${registryStringNoScope}${os.EOL}${registryString}${os.EOL}${alwaysAuthString}${os.EOL}${authString}`; } else { newContents += `${authString}${os.EOL}${registryString}${os.EOL}${alwaysAuthString}`; }