Commit 5f7f18a 1 parent cf21285 commit 5f7f18a Copy full SHA for 5f7f18a
File tree 1 file changed +7
-0
lines changed
1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change 1
1
'use strict' ;
2
2
const fs = require ( 'fs-extra' ) ;
3
+ const filter = require ( 'lodash/filter' ) ;
3
4
4
5
const stop = require ( './stop' ) ;
5
6
const Config = require ( '../utils/config' ) ;
@@ -37,6 +38,12 @@ module.exports.execute = function execute() {
37
38
38
39
return this . ui . run ( this . service . callHook ( 'uninstall' ) , 'Removing related configuration' ) ;
39
40
} ) . then ( ( ) => this . ui . run ( ( ) => {
41
+ let systemConfig = Config . load ( 'system' ) ;
42
+ let cleanedInstances = filter ( systemConfig . get ( 'instances' ) , ( instance ) => {
43
+ return instance . cwd !== process . cwd ( ) ;
44
+ } ) ;
45
+ systemConfig . set ( 'instances' , cleanedInstances ) . save ( ) ;
46
+
40
47
return Promise . all ( fs . readdirSync ( '.' ) . map ( file => fs . remove ( file ) ) ) ;
41
48
} , 'Removing Ghost installation' ) ) ;
42
49
}
You can’t perform that action at this time.
0 commit comments