From 787d7cd598a275bc3f2567f92ab0641124668c27 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ph=C3=A1t?= <tienphat1501@gmail.com>
Date: Sat, 18 Sep 2021 02:41:47 +0700
Subject: [PATCH] fix: change log message

---
 src/action/index.ts | 6 +++---
 src/cli/index.ts    | 6 +++---
 src/npm.ts          | 2 +-
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/action/index.ts b/src/action/index.ts
index d683a2d..e034bc5 100644
--- a/src/action/index.ts
+++ b/src/action/index.ts
@@ -28,13 +28,13 @@ async function main(): Promise<void> {
     let results = await npmPublish(options);
 
     if (results.type === "none") {
-      console.log(`\n📦 ${results.package} v${results.version} is already published to NPM`);
+      console.log(`\n📦 ${results.package} v${results.version} is already published to ${options.registry}`);
     }
     else if (results.dryRun) {
-      console.log(`\n📦 ${results.package} v${results.version} was NOT actually published to NPM (dry run)`);
+      console.log(`\n📦 ${results.package} v${results.version} was NOT actually published to ${options.registry} (dry run)`);
     }
     else {
-      console.log(`\n📦 Successfully published ${results.package} v${results.version} to NPM`);
+      console.log(`\n📦 Successfully published ${results.package} v${results.version} to ${options.registry}`);
     }
 
     // Set the GitHub Actions output variables
diff --git a/src/cli/index.ts b/src/cli/index.ts
index c95a562..c4114f7 100644
--- a/src/cli/index.ts
+++ b/src/cli/index.ts
@@ -35,13 +35,13 @@ export async function main(args: string[]): Promise<void> {
 
       if (!options.quiet) {
         if (results.type === "none") {
-          console.log(`\n📦 ${results.package} v${results.version} is already published to NPM`);
+          console.log(`\n📦 ${results.package} v${results.version} is already published to ${options.registry}`);
         }
         else if (results.dryRun) {
-          console.log(`\n📦 ${results.package} v${results.version} was NOT actually published to NPM (dry run)`);
+          console.log(`\n📦 ${results.package} v${results.version} was NOT actually published to ${options.registry} (dry run)`);
         }
         else {
-          console.log(`\n📦 Successfully published ${results.package} v${results.version} to NPM`);
+          console.log(`\n📦 Successfully published ${results.package} v${results.version} to ${options.registry}`);
         }
       }
     }
diff --git a/src/npm.ts b/src/npm.ts
index bf51923..4f42d18 100644
--- a/src/npm.ts
+++ b/src/npm.ts
@@ -109,7 +109,7 @@ export const npm = {
       await ezSpawn.async(command, { cwd, stdio, env });
     }
     catch (error) {
-      throw ono(error, `Unable to publish ${name} v${version} to NPM.`);
+      throw ono(error, `Unable to publish ${name} v${version} to ${options.registry}.`);
     }
   },
 };