Commit b971cf8c authored by Jon Pugh's avatar Jon Pugh

If command line option exists when saving context, don't ask for it.

parent 03002094
......@@ -154,7 +154,15 @@ class SaveCommand extends Command
$options = $class::option_documentation();
$properties = [];
foreach ($options as $name => $description) {
$properties[$name] = $this->io->ask("$name ($description)");
// If option does not exist, ask for it.
if (!empty($this->input->getOption($name))) {
$properties[$name] = $this->input->getOption($name);
$this->io->comment("Using option {$name}={$properties[$name]}");
}
else {
$properties[$name] = $this->io->ask("$name ($description)");
}
}
return $properties;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment