File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed
Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,13 @@ import { promisify } from 'util';
1515import { QueryHistoryItemOptions } from './query-history' ;
1616import { isQuickQueryPath } from './quick-query' ;
1717
18+ /**
19+ * Maximum number of lines to put in a binary choice dialog message,
20+ * to work around the fact that we can't guarantee a scrollable text
21+ * box for it.
22+ */
23+ const MAX_MESSAGE_LINES = 20 ;
24+
1825/**
1926 * queries.ts
2027 * -------------
@@ -273,7 +280,13 @@ async function checkAndConfirmDatabaseUpgrade(qs: qsClient.QueryServerClient, db
273280
274281 logger . log ( descriptionMessage ) ;
275282 // Ask the user to confirm the upgrade.
276- const shouldUpgrade = await helpers . showBinaryChoiceDialog ( `Should the database ${ db . databaseUri . fsPath } be upgraded?\n\n${ descriptionMessage } ` ) ;
283+
284+ let messageLines = descriptionMessage . split ( '\n' ) ;
285+ if ( messageLines . length > MAX_MESSAGE_LINES ) {
286+ messageLines = messageLines . slice ( 0 , MAX_MESSAGE_LINES ) ;
287+ messageLines . push ( "... [full list of changes can be found in Output > CodeQL Extension Log]" ) ;
288+ }
289+ const shouldUpgrade = await helpers . showBinaryChoiceDialog ( `Should the database ${ db . databaseUri . fsPath } be upgraded?\n\n${ messageLines . join ( "\n" ) } ` ) ;
277290 if ( shouldUpgrade ) {
278291 return params ;
279292 }
You can’t perform that action at this time.
0 commit comments