You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But I think if --no-prompt is set, it shouldn't prompt either?
I guess the logic we need here is something like:
When attempting to either run config directly,
by default, prompt for the main values
if no prompt is set, just run the advanced config handling with whatever info we've got
The flip side is:
When attempting to run a setup step without a value being either passed in or ALREADY in config, then:
if it's ok to prompt, prompt for missing info
otherwise throw an error
I think?
ghost config --mail SMTP --mailservice Mailgun --mailuser postmaster@domain --mailpass xxx --no-prompt
/usr/lib/node_modules/ghost-cli/node_modules/yargs/yargs.js:1079
else throw err
^
Error: Prompts have been disabled, please provide options via command line flags
at UI.prompt (/usr/lib/node_modules/ghost-cli/lib/ui/index.js:116:19)
at ConfigCommand.run (/usr/lib/node_modules/ghost-cli/lib/commands/config/index.js:126:24)
at Function._run (/usr/lib/node_modules/ghost-cli/lib/command.js:183:48)
at Object.handler (/usr/lib/node_modules/ghost-cli/lib/command.js:108:22)
at Object.self.runCommand (/usr/lib/node_modules/ghost-cli/node_modules/yargs/lib/command.js:233:22)
at Object.Yargs.self._parseArgs (/usr/lib/node_modules/ghost-cli/node_modules/yargs/yargs.js:990:30)
at Object.Yargs.self.parse (/usr/lib/node_modules/ghost-cli/node_modules/yargs/yargs.js:532:23)
at Object.run (/usr/lib/node_modules/ghost-cli/lib/bootstrap.js:153:14)
at Object.<anonymous> (/usr/lib/node_modules/ghost-cli/bin/ghost:12:11)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.runMain (module.js:604:10)
at run (bootstrap_node.js:389:7)
The text was updated successfully, but these errors were encountered:
closesTryGhost#280, closesTryGhost#268, refs TryGhost#317
- handle prompts better, don't prompt for mysql info if the user has specified sqlite
- don't prompt for URL if user has provided it
This is very similar to #276 (ghost uninstall throws the same error) and also related to #232 (mail config issue)
If I try to run ghost config with only mail settings, and the --no-prompt flag, I get an error.
I think this is probably also related to #268 (pre loading config)
In this case, I've already run setup, want to now set the mail config as additional properties.
There is a case that says that if db & url are set, or all the values that are prompted for are set, don't prompt: https://github.com/TryGhost/Ghost-CLI/blob/master/lib/commands/config/index.js#L122
But I think if
--no-prompt
is set, it shouldn't prompt either?I guess the logic we need here is something like:
When attempting to either run config directly,
The flip side is:
When attempting to run a setup step without a value being either passed in or ALREADY in config, then:
I think?
The text was updated successfully, but these errors were encountered: