Fix a minor bug in code analyzer and improve logging for when no changes exist (#36915)
This commit is contained in:
parent
bd6586a378
commit
48cd5917ed
|
@ -64,6 +64,15 @@ const program = new Command()
|
|||
'TEMPLATES',
|
||||
Logger.notice
|
||||
);
|
||||
} else {
|
||||
Logger.notice( '\n\n## TEMPLATE CHANGES' );
|
||||
Logger.notice(
|
||||
'---------------------------------------------------'
|
||||
);
|
||||
Logger.notice( 'No template changes found.' );
|
||||
Logger.notice(
|
||||
'---------------------------------------------------'
|
||||
);
|
||||
}
|
||||
|
||||
if ( changes.hooks.size ) {
|
||||
|
@ -73,6 +82,15 @@ const program = new Command()
|
|||
'HOOKS',
|
||||
Logger.notice
|
||||
);
|
||||
} else {
|
||||
Logger.notice( '\n\n## HOOK CHANGES' );
|
||||
Logger.notice(
|
||||
'---------------------------------------------------'
|
||||
);
|
||||
Logger.notice( 'No hook changes found.' );
|
||||
Logger.notice(
|
||||
'---------------------------------------------------'
|
||||
);
|
||||
}
|
||||
|
||||
if ( changes.schema.filter( ( s ) => ! s.areEqual ).length ) {
|
||||
|
@ -82,10 +100,28 @@ const program = new Command()
|
|||
outputStyle,
|
||||
Logger.notice
|
||||
);
|
||||
} else {
|
||||
Logger.notice( '\n\n## SCHEMA CHANGES' );
|
||||
Logger.notice(
|
||||
'---------------------------------------------------'
|
||||
);
|
||||
Logger.notice( 'No schema changes found.' );
|
||||
Logger.notice(
|
||||
'---------------------------------------------------'
|
||||
);
|
||||
}
|
||||
|
||||
if ( changes.db ) {
|
||||
printDatabaseUpdates( changes.db, outputStyle, Logger.notice );
|
||||
} else {
|
||||
Logger.notice( '\n\n## DB CHANGES' );
|
||||
Logger.notice(
|
||||
'---------------------------------------------------'
|
||||
);
|
||||
Logger.notice( 'No db changes found.' );
|
||||
Logger.notice(
|
||||
'---------------------------------------------------'
|
||||
);
|
||||
}
|
||||
} );
|
||||
|
||||
|
|
|
@ -32,6 +32,8 @@ export const scanForChanges = async (
|
|||
? clonedPath
|
||||
: await cloneRepo( source );
|
||||
|
||||
Logger.endTask();
|
||||
|
||||
Logger.notice(
|
||||
`Temporary clone of ${ source } created at ${ tmpRepoPath }`
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue