Skip to content

Commit

Permalink
✨ Allow start flag to be provided, skip prompts
Browse files Browse the repository at this point in the history
refs #194

- if --start is provided, use that instead of prompting
- makes it easier to call ghost install/ghost setup programmatically
  • Loading branch information
ErisDS committed May 3, 2017
1 parent d60d77b commit 0411285
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,10 @@ module.exports = {
alias: 'l',
description: 'Quick setup for a local installation of Ghost',
flag: true
}, {
name: 'start',
description: 'Automatically start Ghost without prompting',
flag: true
}].concat(advancedOptions)
},

Expand Down
2 changes: 2 additions & 0 deletions lib/commands/setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ module.exports.execute = function execute(options) {
// sure we're set up in development mode
this.development = true;
process.env.NODE_ENV = this.environment = 'development';
} else {
context.start = options.start || false;
}

return configCommand.execute.call(this, null, null, options).then((config) => {
Expand Down

0 comments on commit 0411285

Please sign in to comment.