File tree Expand file tree Collapse file tree 2 files changed +13
-0
lines changed
commands/update/utilities Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ import { subscribeToWorkflow } from '../../../command-builder/utilities/schemati
1919import { colors , figures } from '../../../utilities/color' ;
2020import { assertIsError } from '../../../utilities/error' ;
2121import { writeErrorToLogFile } from '../../../utilities/log-file' ;
22+ import { formatFiles } from '../../../utilities/prettier' ;
2223import { askChoices } from '../../../utilities/prompt' ;
2324import { isTTY } from '../../../utilities/tty' ;
2425import { coerceVersionNumber } from './cli-version' ;
@@ -230,6 +231,18 @@ async function executePackageMigrations(
230231 break ;
231232 }
232233
234+ if ( files . size ) {
235+ try {
236+ await formatFiles ( process . cwd ( ) , files ) ;
237+ } catch ( error ) {
238+ assertIsError ( error ) ;
239+
240+ logger . warn (
241+ `WARNING: Formatting of files failed with the following error: ${ error . message } ` ,
242+ ) ;
243+ }
244+ }
245+
233246 logger . info ( ` Migration completed (${ modifiedFilesText } ).` ) ;
234247
235248 // Commit migration
File renamed without changes.
You can’t perform that action at this time.
0 commit comments