Skip to content

Commit f0af011

Browse files
committed
fix(run): make command descriptions clearer
closes #185 - fix command descriptions - output help note on `ghost run` if it is being run directly
1 parent 59fb3d2 commit f0af011

File tree

2 files changed

+18
-11
lines changed

2 files changed

+18
-11
lines changed

lib/commands.js

+11-11
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ const advancedOptions = require('./commands/config/advanced');
33

44
module.exports = {
55
config: {
6-
description: 'configure a Ghost instance',
6+
description: 'Configure a Ghost instance',
77

88
arguments: [{
99
name: 'key',
@@ -17,20 +17,20 @@ module.exports = {
1717
},
1818

1919
doctor: {
20-
description: 'check the system for any potential hiccups when installing/updating Ghost',
20+
description: 'Check the system for any potential hiccups when installing/updating Ghost',
2121

2222
arguments: [
2323
{name: 'category', optional: true}
2424
]
2525
},
2626

2727
buster: {
28-
description: 'who ya gonna call?'
28+
description: 'Who ya gonna call?'
2929
},
3030

3131
install: {
3232
alias: 'i',
33-
description: 'install a brand new instance of Ghost',
33+
description: 'Install a brand new instance of Ghost',
3434

3535
arguments: [
3636
{name: 'version', optional: true}
@@ -52,7 +52,7 @@ module.exports = {
5252
},
5353

5454
log: {
55-
description: 'view logs of a running ghost process',
55+
description: 'View logs of a running ghost process',
5656

5757
arguments: ['name'],
5858
options: [{
@@ -69,19 +69,19 @@ module.exports = {
6969
},
7070

7171
ls: {
72-
description: 'view running ghost processes'
72+
description: 'View running ghost processes'
7373
},
7474

7575
restart: {
7676
description: 'Restart the Ghost instance'
7777
},
7878

7979
run: {
80-
description: 'start a managed ghost process'
80+
description: 'Run a ghost instance directly (used by process managers and for debugging)'
8181
},
8282

8383
service: {
84-
description: 'run a service-defined command',
84+
description: 'Run a service-defined command',
8585

8686
arguments: [
8787
'command',
@@ -90,7 +90,7 @@ module.exports = {
9090
},
9191

9292
setup: {
93-
description: 'setup an installation of Ghost (after it is installed)',
93+
description: 'Setup an installation of Ghost (after it is installed)',
9494

9595
options: [{
9696
name: 'no-stack',
@@ -105,11 +105,11 @@ module.exports = {
105105
},
106106

107107
start: {
108-
description: 'starts an instance of Ghost'
108+
description: 'Start an instance of Ghost'
109109
},
110110

111111
stop: {
112-
description: 'stops a named instance of Ghost',
112+
description: 'Stops a named instance of Ghost',
113113

114114
options: [{
115115
name: 'all',

lib/commands/run.js

+7
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,13 @@ let instance;
1010
module.exports.execute = function execute() {
1111
checkValidInstall('run');
1212

13+
// If the user is running this command directly, output a little note
14+
// telling them they're likely looking for `ghost start`
15+
if (process.stdin.isTTY) {
16+
this.ui.log('The `ghost run` command is used by the configured Ghost process manager and for debugging. ' +
17+
'If you\'re not running this to debug something, you should run `ghost start` instead.', 'yellow');
18+
}
19+
1320
process.env.paths__contentPath = path.join(process.cwd(), 'content');
1421

1522
this.service.setConfig(Config.load(this.environment));

0 commit comments

Comments
 (0)