From 27178c978006a1cca08f6c392a1279608335f047 Mon Sep 17 00:00:00 2001
From: Edward Romero <edward@greenlight.me>
Date: Tue, 23 Jun 2020 21:16:24 -0400
Subject: [PATCH] update new npmrc contents

---
 dist/index.js   | 2 +-
 src/authutil.ts | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

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}`;
   }