cli icon indicating copy to clipboard operation
cli copied to clipboard

run commands not only in cli

Open bnomei opened this issue 2 years ago • 2 comments

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.

bnomei avatar Nov 08 '22 19:11 bnomei

i encountered this when trying to run the now core clear:cache cli command from my janitor plugin.

bnomei avatar Nov 08 '22 19:11 bnomei

any plans to handle this issue @distantnative ?

teichsta avatar Sep 25 '23 11:09 teichsta