Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 12 additions & 4 deletions src/deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -312,10 +312,15 @@ class Deployer {
if (!deployTarget.create) {
// Check last deployed state. If it's not the same project, ask the user if
// they want to continue anyways. In non-interactive mode just cancel.
const targetDescription = `${deployTarget.project.title} (@${deployTarget.workspace.login}/${deployTarget.project.slug})`;
const targetDescription = `${deployTarget.project.title} (${deployTarget.project.slug}) in the @${deployTarget.workspace.login} workspace`;
if (deployConfig.projectId && deployConfig.projectId !== deployTarget.project.id) {
this.effects.clack.log.warn(
`The \`projectId\` in your deploy.json does not match. Continuing will overwrite ${bold(targetDescription)}.`
wrapAnsi(
`The \`projectId\` in your deploy.json does not match. Continuing will overwrite ${bold(
targetDescription
)}.`,
this.effects.outputColumns
)
);
if (this.effects.isTty) {
const choice = await this.effects.clack.confirm({
Expand All @@ -333,10 +338,13 @@ class Deployer {
throw new CliError("Cancelling deploy due to misconfiguration.");
}
} else if (deployConfig.projectId) {
this.effects.clack.log.info(`Deploying to ${bold(targetDescription)}.`);
this.effects.clack.log.info(wrapAnsi(`Deploying to ${bold(targetDescription)}.`, this.effects.outputColumns));
} else {
this.effects.clack.log.warn(
`The \`projectId\` in your deploy.json is missing. Continuing will overwrite ${bold(targetDescription)}.`
wrapAnsi(
`The \`projectId\` in your deploy.json is missing. Continuing will overwrite ${bold(targetDescription)}.`,
this.effects.outputColumns
)
);
if (this.effects.isTty) {
const choice = await this.effects.clack.confirm({
Expand Down