Skip to content

Commit

Permalink
fix: improve log messages
Browse files Browse the repository at this point in the history
  • Loading branch information
belopash committed Sep 11, 2024
1 parent b3ab7d7 commit 005f8d6
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@subsquid/cli",
"description": "squid cli tool",
"version": "3.0.0-beta.7",
"version": "3.0.0-beta.8",
"license": "GPL-3.0-or-later",
"repository": "[email protected]:subsquid/squid-cli.git",
"publishConfig": {
Expand Down
12 changes: 10 additions & 2 deletions src/commands/deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,15 @@ export default class Deploy extends DeployCommand {

private async promptUpdateSquid(
target: Squid,
{ using = 'using "--force" flag', interactive }: { using?: string; interactive?: boolean } = {},
{
using = 'using "--force" flag',
interactive,
hardReset,
}: {
using?: string;
interactive?: boolean;
hardReset?: boolean;
} = {},
) {
const warning = `A squid ${printSquid(target)} already exists.`;

Expand All @@ -295,7 +303,7 @@ export default class Deploy extends DeployCommand {
name: 'confirm',
type: 'confirm',
message: 'Are you sure?',
prefix: `A squid ${printSquid(target)} will be updated.`,
prefix: `A squid ${printSquid(target)} will be ${hardReset ? `recreated` : `updated`}.`,
},
]);
Expand Down
4 changes: 2 additions & 2 deletions src/deploy-command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ You can not run deploys on the same squid in parallel`;
});
if (!oldSquid) return true;

const warning = `A tag "${tag}" has already been assigned to ${printSquid(oldSquid)}.`;
const warning = `The tag "${tag}" has already been assigned to ${printSquid(oldSquid)}.`;

if (!interactive) {
this.error([warning, `Please do it explicitly ${using}`].join('\n'));
Expand All @@ -70,7 +70,7 @@ You can not run deploys on the same squid in parallel`;
name: 'confirm',
type: 'confirm',
message: 'Are you sure?',
prefix: `The tag will be assigned to the newly created squid.`,
prefix: `The tag will be reassigned.`,
},
]);
Expand Down

0 comments on commit 005f8d6

Please sign in to comment.