From b9164e8546f14e59197bf264927f321a6be74bd9 Mon Sep 17 00:00:00 2001
From: Iheanyi Ekechukwu <iekechukwu@gmail.com>
Date: Tue, 6 Aug 2019 12:23:49 -0400
Subject: [PATCH] Fix the registry string.

---
 lib/authutil.js | 4 ++--
 src/authutil.ts | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/lib/authutil.js b/lib/authutil.js
index 51bb92a1..e5a8e2b1 100644
--- a/lib/authutil.js
+++ b/lib/authutil.js
@@ -45,9 +45,9 @@ function writeRegistryToFile(registryUrl, fileLocation) {
     const registryString = scope
         ? `${scope}:registry=${registryUrl}`
         : `registry=${registryUrl}`;
-    newContents += `${registryString}${os.EOL}${authString}`;
+    newContents += `${authString}${os.EOL}${registryString}`;
     fs.writeFileSync(fileLocation, newContents);
-//     core.exportVariable('NPM_CONFIG_USERCONFIG', fileLocation);
+    //   core.exportVariable('NPM_CONFIG_USERCONFIG', fileLocation);
     // Export empty node_auth_token so npm doesn't complain about not being able to find it
     // core.exportVariable('NODE_AUTH_TOKEN', 'XXXXX-XXXXX-XXXXX-XXXXX');
 }
diff --git a/src/authutil.ts b/src/authutil.ts
index cb6bd6a2..f4965590 100644
--- a/src/authutil.ts
+++ b/src/authutil.ts
@@ -40,7 +40,7 @@ function writeRegistryToFile(registryUrl: string, fileLocation: string) {
   const registryString = scope
     ? `${scope}:registry=${registryUrl}`
     : `registry=${registryUrl}`;
-  newContents += `${registryString}${os.EOL}${authString}`;
+  newContents += `${authString}${os.EOL}${registryString}`;
   fs.writeFileSync(fileLocation, newContents);
   //   core.exportVariable('NPM_CONFIG_USERCONFIG', fileLocation);
   // Export empty node_auth_token so npm doesn't complain about not being able to find it