File tree Expand file tree Collapse file tree 12 files changed +44
-42
lines changed Expand file tree Collapse file tree 12 files changed +44
-42
lines changed Original file line number Diff line number Diff line change @@ -30,7 +30,6 @@ class NginxExtension extends cli.Extension {
30
30
}
31
31
32
32
this . instance = this . system . getInstance ( ) ;
33
- this . instance . loadConfig ( ) ;
34
33
35
34
cmd . addStage ( 'nginx' , this . setupNginx . bind ( this ) ) ;
36
35
cmd . addStage ( 'ssl' , this . setupSSL . bind ( this ) ) ;
@@ -219,7 +218,6 @@ class NginxExtension extends cli.Extension {
219
218
220
219
uninstall ( ) {
221
220
this . instance = this . system . getInstance ( ) ;
222
- this . instance . loadConfig ( ) ;
223
221
224
222
if ( ! this . instance . cliConfig . get ( 'extension.nginx' , false ) ) {
225
223
return ;
Original file line number Diff line number Diff line change @@ -14,7 +14,6 @@ class SystemdExtension extends cli.Extension {
14
14
15
15
setup ( cmd , argv ) {
16
16
let instance = this . system . getInstance ( ) ;
17
- instance . loadConfig ( ) ;
18
17
19
18
if ( ! argv . local && instance . config . get ( 'process' ) === 'systemd' ) {
20
19
cmd . addStage ( 'systemd' , this . _setup . bind ( this ) ) ;
Original file line number Diff line number Diff line change @@ -14,7 +14,6 @@ class ConfigCommand extends Command {
14
14
super ( ui , system ) ;
15
15
16
16
let instance = this . system . getInstance ( ) ;
17
- instance . loadConfig ( true ) ;
18
17
this . config = instance . config ;
19
18
}
20
19
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ class LogCommand extends Command {
19
19
// relative to that
20
20
process . chdir ( instance . dir ) ;
21
21
22
- instance . loadRunningConfig ( true ) ;
22
+ instance . loadRunningEnvironment ( true ) ;
23
23
24
24
// Check if logging file transport is set in config
25
25
if ( ! includes ( instance . config . get ( 'logging.transports' , [ ] ) , 'file' ) ) {
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ class RestartCommand extends Command {
11
11
return Promise . reject ( new Error ( 'Ghost instance is not currently running.' ) ) ;
12
12
}
13
13
14
- instance . loadRunningConfig ( true , true ) ;
14
+ instance . loadRunningEnvironment ( true , true ) ;
15
15
16
16
return this . runCommand ( StopCommand , argv ) . then ( ( ) => this . runCommand ( StartCommand , argv ) ) ;
17
17
}
Original file line number Diff line number Diff line change @@ -13,7 +13,6 @@ class RunCommand extends Command {
13
13
}
14
14
15
15
let instance = this . system . getInstance ( ) ;
16
- instance . loadConfig ( true ) ;
17
16
18
17
process . env . paths__contentPath = path . join ( process . cwd ( ) , 'content' ) ;
19
18
Original file line number Diff line number Diff line change @@ -66,7 +66,6 @@ class SetupCommand extends Command {
66
66
title : 'Setting up instance' ,
67
67
task : ( ) => {
68
68
let instance = this . system . getInstance ( ) ;
69
- instance . loadConfig ( ) ;
70
69
instance . name = argv . pname || url . parse ( instance . config . get ( 'url' ) ) . hostname . replace ( / \. / g, '-' ) ;
71
70
this . system . addInstance ( instance ) ;
72
71
}
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ class StartCommand extends Command {
27
27
return Promise . reject ( new Error ( 'Ghost is already running.' ) ) ;
28
28
}
29
29
30
- instance . loadConfig ( ) ;
30
+ instance . checkEnvironment ( ) ;
31
31
32
32
return this . ui . listr ( startupChecks . concat ( {
33
33
title : 'Running database migrations' ,
Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ class StopCommand extends Command {
41
41
return Promise . reject ( new errors . SystemError ( 'No running Ghost instance found here.' ) ) ;
42
42
}
43
43
44
- instance . loadRunningConfig ( ) ;
44
+ instance . loadRunningEnvironment ( true ) ;
45
45
46
46
let stop = ( ) => Promise . resolve ( instance . process . stop ( process . cwd ( ) ) ) . then ( ( ) => {
47
47
instance . running = null ;
Original file line number Diff line number Diff line change @@ -31,14 +31,13 @@ class UninstallCommand extends Command {
31
31
return Promise . resolve ( ) ;
32
32
}
33
33
34
- instance . loadRunningConfig ( true , true ) ;
34
+ instance . loadRunningEnvironment ( true , true ) ;
35
35
36
36
// If the instance is currently running we need to make
37
37
// sure it gets stopped
38
38
return this . runCommand ( StopCommand ) ;
39
39
} ) . then ( ( ) => {
40
40
this . system . setEnvironment ( ! fs . existsSync ( 'config.production.json' ) ) ;
41
- instance . loadConfig ( true ) ;
42
41
43
42
return this . ui . run ( this . system . hook ( 'uninstall' ) , 'Removing related configuration' ) ;
44
43
} ) . then ( ( ) => this . ui . run ( ( ) => {
You can’t perform that action at this time.
0 commit comments