From 4ab9102fdd8b6ed6296c906be14b636f4c40a043 Mon Sep 17 00:00:00 2001 From: Bruno Basto Date: Fri, 15 Mar 2024 13:31:44 -0300 Subject: [PATCH] Fixes text so that it doesn't reference "the above tables" when tables are not displayed --- src/bin/vip-import-sql.js | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/bin/vip-import-sql.js b/src/bin/vip-import-sql.js index 19bd32367d..7dba819572 100755 --- a/src/bin/vip-import-sql.js +++ b/src/bin/vip-import-sql.js @@ -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 @@ -459,6 +467,8 @@ void command( { formattedEnvironment, track, domain, + isMultiSite, + tableNames, } ); /**