Skip to content

Commit

Permalink
Fixes text so that it doesn't reference "the above tables" when table…
Browse files Browse the repository at this point in the history
…s are not displayed
  • Loading branch information
brunobasto committed Mar 15, 2024
1 parent 99456dc commit 4ab9102
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 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 = [
},
];

const promptToContinue = async ( { launched, formattedEnvironment, track, domain } ) => {
const promptToContinue = async ( {
launched,
formattedEnvironment,
track,
domain,
isMultiSite,
tableNames,
} ) => {
console.log();
const promptToMatch = domain.toUpperCase();
const source = ! isMultiSite && tableNames?.length ? 'the above tables' : 'the above file';
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 ${ source } into a ${
launched ? 'launched' : 'un-launched'
} ${ formattedEnvironment } site ${ chalk.yellow( domain ) }.\nType '${ chalk.yellow(
promptToMatch
Expand Down Expand Up @@ -459,6 +467,8 @@ void command( {
formattedEnvironment,
track,
domain,
isMultiSite,
tableNames,
} );

/**
Expand Down

0 comments on commit 4ab9102

Please sign in to comment.