cli
cli copied to clipboard
run commands not only in cli
when calling a command in like a template with \Kirby\CLI\CLI::command('janitor:whistle') it will fail with undefined constant STDOUT.
suggestion when a command is not run in cli (check via php_sapi_name() === 'cli') then set output to quiet automatically. see #20.
alternative than to quiet it would be to push it to an static array on the kirby cli object - kind of like a log.
i encountered this when trying to run the now core clear:cache cli command from my janitor plugin.
any plans to handle this issue @distantnative ?