Skip to content

Commit 34ffa37

Browse files
authored
tweak format of project identifiers in deploy (#1451)
1 parent 6b6ae78 commit 34ffa37

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

src/deploy.ts

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -312,10 +312,15 @@ class Deployer {
312312
if (!deployTarget.create) {
313313
// Check last deployed state. If it's not the same project, ask the user if
314314
// they want to continue anyways. In non-interactive mode just cancel.
315-
const targetDescription = `${deployTarget.project.title} (@${deployTarget.workspace.login}/${deployTarget.project.slug})`;
315+
const targetDescription = `${deployTarget.project.title} (${deployTarget.project.slug}) in the @${deployTarget.workspace.login} workspace`;
316316
if (deployConfig.projectId && deployConfig.projectId !== deployTarget.project.id) {
317317
this.effects.clack.log.warn(
318-
`The \`projectId\` in your deploy.json does not match. Continuing will overwrite ${bold(targetDescription)}.`
318+
wrapAnsi(
319+
`The \`projectId\` in your deploy.json does not match. Continuing will overwrite ${bold(
320+
targetDescription
321+
)}.`,
322+
this.effects.outputColumns
323+
)
319324
);
320325
if (this.effects.isTty) {
321326
const choice = await this.effects.clack.confirm({
@@ -333,10 +338,13 @@ class Deployer {
333338
throw new CliError("Cancelling deploy due to misconfiguration.");
334339
}
335340
} else if (deployConfig.projectId) {
336-
this.effects.clack.log.info(`Deploying to ${bold(targetDescription)}.`);
341+
this.effects.clack.log.info(wrapAnsi(`Deploying to ${bold(targetDescription)}.`, this.effects.outputColumns));
337342
} else {
338343
this.effects.clack.log.warn(
339-
`The \`projectId\` in your deploy.json is missing. Continuing will overwrite ${bold(targetDescription)}.`
344+
wrapAnsi(
345+
`The \`projectId\` in your deploy.json is missing. Continuing will overwrite ${bold(targetDescription)}.`,
346+
this.effects.outputColumns
347+
)
340348
);
341349
if (this.effects.isTty) {
342350
const choice = await this.effects.clack.confirm({

0 commit comments

Comments
 (0)