@@ -30,6 +30,7 @@ import {
3030import { cache } from "../common/decorators" ;
3131import { IOptions } from "../declarations" ;
3232import semver = require( "semver/preload" ) ;
33+ import { ICleanupService } from "../definitions/cleanup-service" ;
3334
3435export class ProjectConfigService implements IProjectConfigService {
3536 private forceUsingNewConfig : boolean = false ;
@@ -39,7 +40,8 @@ export class ProjectConfigService implements IProjectConfigService {
3940 private $fs : IFileSystem ,
4041 private $logger : ILogger ,
4142 private $injector : IInjector ,
42- private $options : IOptions
43+ private $options : IOptions ,
44+ private $cleanupService : ICleanupService
4345 ) { }
4446
4547 public setForceUsingNewConfig ( force : boolean ) {
@@ -329,7 +331,7 @@ export default {
329331 // return Object.assign({}, ...additionalData, NSConfig);
330332 }
331333
332- public writeLegacyNSConfigIfNeeded (
334+ public async writeLegacyNSConfigIfNeeded (
333335 projectDir : string ,
334336 runtimePackage : IBasePluginData
335337 ) {
@@ -370,6 +372,9 @@ You may add \`nsconfig.json\` to \`.gitignore\` as the CLI will regenerate it as
370372 appPath : this . getValue ( "appPath" ) ,
371373 appResourcesPath : this . getValue ( "appResourcesPath" ) ,
372374 } ) ;
375+
376+ // mark the file for cleanup after the CLI exits
377+ await this . $cleanupService . addCleanupDeleteAction ( nsConfigPath ) ;
373378 }
374379
375380 // todo: move into config manipulation
0 commit comments