@@ -30,6 +30,7 @@ import {
30
30
import { cache } from "../common/decorators" ;
31
31
import { IOptions } from "../declarations" ;
32
32
import semver = require( "semver/preload" ) ;
33
+ import { ICleanupService } from "../definitions/cleanup-service" ;
33
34
34
35
export class ProjectConfigService implements IProjectConfigService {
35
36
private forceUsingNewConfig : boolean = false ;
@@ -39,7 +40,8 @@ export class ProjectConfigService implements IProjectConfigService {
39
40
private $fs : IFileSystem ,
40
41
private $logger : ILogger ,
41
42
private $injector : IInjector ,
42
- private $options : IOptions
43
+ private $options : IOptions ,
44
+ private $cleanupService : ICleanupService
43
45
) { }
44
46
45
47
public setForceUsingNewConfig ( force : boolean ) {
@@ -329,7 +331,7 @@ export default {
329
331
// return Object.assign({}, ...additionalData, NSConfig);
330
332
}
331
333
332
- public writeLegacyNSConfigIfNeeded (
334
+ public async writeLegacyNSConfigIfNeeded (
333
335
projectDir : string ,
334
336
runtimePackage : IBasePluginData
335
337
) {
@@ -370,6 +372,9 @@ You may add \`nsconfig.json\` to \`.gitignore\` as the CLI will regenerate it as
370
372
appPath : this . getValue ( "appPath" ) ,
371
373
appResourcesPath : this . getValue ( "appResourcesPath" ) ,
372
374
} ) ;
375
+
376
+ // mark the file for cleanup after the CLI exits
377
+ await this . $cleanupService . addCleanupDeleteAction ( nsConfigPath ) ;
373
378
}
374
379
375
380
// todo: move into config manipulation
0 commit comments