From 2c67fce0c809a49b82526c1bc4f291ebe5cd7365 Mon Sep 17 00:00:00 2001
From: Valmir Barbosa <valmir.php@gmail.com>
Date: Wed, 25 Sep 2019 03:43:50 -0300
Subject: [PATCH] fix auth GPR

---
 .gitignore      | 3 +++
 src/authutil.ts | 3 ++-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/.gitignore b/.gitignore
index 25b580bc..b7514725 100644
--- a/.gitignore
+++ b/.gitignore
@@ -90,3 +90,6 @@ typings/
 
 # DynamoDB Local files
 .dynamodb/
+
+# IDEs
+.idea/
diff --git a/src/authutil.ts b/src/authutil.ts
index 07e0b24c..3b1f8340 100644
--- a/src/authutil.ts
+++ b/src/authutil.ts
@@ -45,7 +45,8 @@ function writeRegistryToFile(
   }
   // Remove http: or https: from front of registry.
   const authString: string =
-    registryUrl.replace(/(^\w+:|^)/, '') + ':_authToken=${NODE_AUTH_TOKEN}';
+    registryUrl.replace(/(^\w+:|^)/, '')
+    + ':_authToken=' + process.env['NODE_AUTH_TOKEN'];
   const registryString: string = scope
     ? `${scope}:registry=${registryUrl}`
     : `registry=${registryUrl}`;