Skip to content

Commit

Permalink
Merge pull request #1743 from Automattic/update/generic-prompt-messag…
Browse files Browse the repository at this point in the history
…e-sql-import

Update SQL import prompt message
  • Loading branch information
iamchughmayank authored Mar 27, 2024
2 parents 0ba6c66 + f658acc commit 54432f1
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/bin/vip-import-sql.js
Original file line number Diff line number Diff line change
Expand Up @@ -231,13 +231,21 @@ const examples = [
},
];

export const promptToContinue = async ( { launched, formattedEnvironment, track, domain } ) => {
export const promptToContinue = async ( {
launched,
formattedEnvironment,
track,
domain,
tableNames,
} ) => {
console.log();
const promptToMatch = domain.toUpperCase();
const promptResponse = await prompt( {
type: 'input',
name: 'confirmedDomain',
message: `You are about to import the above tables into a ${
message: `You are about to import ${
tableNames && Array.isArray( tableNames ) && tableNames.length ? 'above tables' : ''
} into a ${
launched ? 'launched' : 'un-launched'
} ${ formattedEnvironment } site ${ chalk.yellow( domain ) }.\nType '${ chalk.yellow(
promptToMatch
Expand Down Expand Up @@ -459,6 +467,7 @@ void command( {
formattedEnvironment,
track,
domain,
tableNames,
} );

/**
Expand Down

0 comments on commit 54432f1

Please sign in to comment.