summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJon Pugh2017-11-27 17:35:50 (GMT)
committerJon Pugh2017-11-27 17:35:50 (GMT)
commit1c0f6e2639834c5fbe0dd7062674421b5dee6154 (patch)
treed6d85175600e928a17a4bf41c9ba5aae0e262b84
parente171daeb8257aeefa6aad1264858352227fc2a0b (diff)
Throw an exception if there is no context. Only happens in non-interactive mode.
-rw-r--r--src/Command/VerifyCommand.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/Command/VerifyCommand.php b/src/Command/VerifyCommand.php
index db5e730..b7425dc 100644
--- a/src/Command/VerifyCommand.php
+++ b/src/Command/VerifyCommand.php
@@ -60,6 +60,11 @@ class VerifyCommand extends Command
*/
protected function execute(InputInterface $input, OutputInterface $output)
{
+
+ if (empty($this->context)) {
+ throw new \Exception("You must specify a context to verify.");
+ }
+
$this->io->title(strtr("Verify %type: %name", [
'%name' => $this->context_name,
'%type' => $this->context->type,