This repository was archived by the owner on Jan 15, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +10
-5
lines changed
Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -532,9 +532,11 @@ export class SchemaMerger {
532532
533533 // Delete existing output
534534 let outputPath = ppath . resolve ( this . output + '.schema' )
535- await fs . remove ( this . output + '.schema' )
536- await fs . remove ( this . output + '.schema.final' )
537- await fs . remove ( this . output + '.schema.expanded' )
535+ if ( ! this . checkOnly ) {
536+ await fs . remove ( this . output + '.schema' )
537+ await fs . remove ( this . output + '.schema.final' )
538+ await fs . remove ( this . output + '.schema.expanded' )
539+ }
538540
539541 let componentPaths : PathComponent [ ] = [ ]
540542 let schemas = this . files . get ( '.schema' )
@@ -679,7 +681,9 @@ export class SchemaMerger {
679681 * Does extensive error checking and validation against the schema.
680682 */
681683 private async mergeUISchemas ( schema : any ) : Promise < void > {
682- await fs . remove ( this . output + '.uischema' )
684+ if ( ! this . checkOnly ) {
685+ await fs . remove ( this . output + '.uischema' )
686+ }
683687
684688 let uiSchemas = this . files . get ( '.uischema' )
685689 let result = { }
@@ -872,7 +876,7 @@ export class SchemaMerger {
872876 }
873877 }
874878 if ( ! this . checkOnly ) {
875- await fs . remove ( importedDir )
879+ await fs . remove ( ppath . join ( this . imports , importedDir ) )
876880 }
877881 }
878882 }
Original file line number Diff line number Diff line change @@ -357,6 +357,7 @@ describe('dialog:merge', async () => {
357357 assert ( merged5 ?. deleted . length === 4 , 'Wrong number deleted 5th' )
358358 assert ( merged5 ?. unchanged . length === 0 , 'Wrong number unchanged 5th' )
359359 assert ( merged5 ?. conflicts . length === 1 , 'Wrong number of conflicts on 5th' )
360+ assert ( ! await fs . pathExists ( ppath . join ( tempDir , 'imported/nuget3' ) ) )
360361 } )
361362
362363 it ( 'package.json' , async ( ) => {
You can’t perform that action at this time.
0 commit comments