From f663f822822b0940bcacfa7977ebdd048c05c60b Mon Sep 17 00:00:00 2001 From: Hannah Wolfe Date: Sat, 22 Apr 2017 15:32:13 +0100 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20Allow=20start=20flag=20to=20be=20pr?= =?UTF-8?q?ovided,=20skip=20prompts?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit refs #194 - if --start is provided, use that instead of prompting - makes it easier to call ghost install/ghost setup programmatically --- lib/commands.js | 4 ++++ lib/commands/setup.js | 2 ++ 2 files changed, 6 insertions(+) diff --git a/lib/commands.js b/lib/commands.js index 46b5804a0..9cd97cd25 100644 --- a/lib/commands.js +++ b/lib/commands.js @@ -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) }, diff --git a/lib/commands/setup.js b/lib/commands/setup.js index bc19375a9..73141b685 100644 --- a/lib/commands/setup.js +++ b/lib/commands/setup.js @@ -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) => {