Skip to content

Commit e59377e

Browse files
authoredMay 13, 2022
Merge pull request #45 from 6thpath/fix/log
Change log message when publishing package to other specified registry
2 parents b3ce8a9 + 787d7cd commit e59377e

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed
 

‎src/action/index.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,13 @@ async function main(): Promise<void> {
2828
let results = await npmPublish(options);
2929

3030
if (results.type === "none") {
31-
console.log(`\n📦 ${results.package} v${results.version} is already published to NPM`);
31+
console.log(`\n📦 ${results.package} v${results.version} is already published to ${options.registry}`);
3232
}
3333
else if (results.dryRun) {
34-
console.log(`\n📦 ${results.package} v${results.version} was NOT actually published to NPM (dry run)`);
34+
console.log(`\n📦 ${results.package} v${results.version} was NOT actually published to ${options.registry} (dry run)`);
3535
}
3636
else {
37-
console.log(`\n📦 Successfully published ${results.package} v${results.version} to NPM`);
37+
console.log(`\n📦 Successfully published ${results.package} v${results.version} to ${options.registry}`);
3838
}
3939

4040
// Set the GitHub Actions output variables

‎src/cli/index.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,13 @@ export async function main(args: string[]): Promise<void> {
3535

3636
if (!options.quiet) {
3737
if (results.type === "none") {
38-
console.log(`\n📦 ${results.package} v${results.version} is already published to NPM`);
38+
console.log(`\n📦 ${results.package} v${results.version} is already published to ${options.registry}`);
3939
}
4040
else if (results.dryRun) {
41-
console.log(`\n📦 ${results.package} v${results.version} was NOT actually published to NPM (dry run)`);
41+
console.log(`\n📦 ${results.package} v${results.version} was NOT actually published to ${options.registry} (dry run)`);
4242
}
4343
else {
44-
console.log(`\n📦 Successfully published ${results.package} v${results.version} to NPM`);
44+
console.log(`\n📦 Successfully published ${results.package} v${results.version} to ${options.registry}`);
4545
}
4646
}
4747
}

‎src/npm.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ export const npm = {
109109
await ezSpawn.async(command, { cwd, stdio, env });
110110
}
111111
catch (error) {
112-
throw ono(error, `Unable to publish ${name} v${version} to NPM.`);
112+
throw ono(error, `Unable to publish ${name} v${version} to ${options.registry}.`);
113113
}
114114
},
115115
};

0 commit comments

Comments
 (0)
Failed to load comments.