Skip to content

Commit

Permalink
fix(run): make command descriptions clearer
Browse files Browse the repository at this point in the history
closes #185
- fix command descriptions
- output help note on `ghost run` if it is being run directly
  • Loading branch information
acburdine committed May 5, 2017
1 parent 59fb3d2 commit f0af011
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 11 deletions.
22 changes: 11 additions & 11 deletions lib/commands.js
Expand Up @@ -3,7 +3,7 @@ const advancedOptions = require('./commands/config/advanced');

module.exports = {
config: {
description: 'configure a Ghost instance',
description: 'Configure a Ghost instance',

arguments: [{
name: 'key',
Expand All @@ -17,20 +17,20 @@ module.exports = {
},

doctor: {
description: 'check the system for any potential hiccups when installing/updating Ghost',
description: 'Check the system for any potential hiccups when installing/updating Ghost',

arguments: [
{name: 'category', optional: true}
]
},

buster: {
description: 'who ya gonna call?'
description: 'Who ya gonna call?'
},

install: {
alias: 'i',
description: 'install a brand new instance of Ghost',
description: 'Install a brand new instance of Ghost',

arguments: [
{name: 'version', optional: true}
Expand All @@ -52,7 +52,7 @@ module.exports = {
},

log: {
description: 'view logs of a running ghost process',
description: 'View logs of a running ghost process',

arguments: ['name'],
options: [{
Expand All @@ -69,19 +69,19 @@ module.exports = {
},

ls: {
description: 'view running ghost processes'
description: 'View running ghost processes'
},

restart: {
description: 'Restart the Ghost instance'
},

run: {
description: 'start a managed ghost process'
description: 'Run a ghost instance directly (used by process managers and for debugging)'
},

service: {
description: 'run a service-defined command',
description: 'Run a service-defined command',

arguments: [
'command',
Expand All @@ -90,7 +90,7 @@ module.exports = {
},

setup: {
description: 'setup an installation of Ghost (after it is installed)',
description: 'Setup an installation of Ghost (after it is installed)',

options: [{
name: 'no-stack',
Expand All @@ -105,11 +105,11 @@ module.exports = {
},

start: {
description: 'starts an instance of Ghost'
description: 'Start an instance of Ghost'
},

stop: {
description: 'stops a named instance of Ghost',
description: 'Stops a named instance of Ghost',

options: [{
name: 'all',
Expand Down
7 changes: 7 additions & 0 deletions lib/commands/run.js
Expand Up @@ -10,6 +10,13 @@ let instance;
module.exports.execute = function execute() {
checkValidInstall('run');

// If the user is running this command directly, output a little note
// telling them they're likely looking for `ghost start`
if (process.stdin.isTTY) {
this.ui.log('The `ghost run` command is used by the configured Ghost process manager and for debugging. ' +
'If you\'re not running this to debug something, you should run `ghost start` instead.', 'yellow');
}

process.env.paths__contentPath = path.join(process.cwd(), 'content');

this.service.setConfig(Config.load(this.environment));
Expand Down

0 comments on commit f0af011

Please sign in to comment.