Skip to content
Snippets Groups Projects

Ban and artifacts snapshots

Compare and
66 files
+ 4621
604
Compare changes
  • Side-by-side
  • Inline
Files
66
+ 11
0
@@ -4,6 +4,7 @@ namespace Minds\Cli;
use ReflectionClass;
use ReflectionMethod;
use Minds\Exceptions\CliException;
/**
* CLI Controller.
@@ -158,6 +159,16 @@ class Controller
return $this->opts;
}
public function gatekeeper($message = '')
{
$this->out(trim("{$message} Start operation?"), $this::OUTPUT_INLINE);
$answer = trim(readline('[y/N] '));
if ($answer != 'y') {
throw new CliException('Cancelled by user');
}
}
/**
* Gets the list of publically available commands and filters out the system ones.
*/
Loading