Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

run commands not only in cli #21

Open
bnomei opened this issue Nov 8, 2022 · 2 comments
Open

run commands not only in cli #21

bnomei opened this issue Nov 8, 2022 · 2 comments

Comments

@bnomei
Copy link

bnomei commented Nov 8, 2022

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
Copy link
Author

bnomei commented Nov 8, 2022

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

@teichsta
Copy link

any plans to handle this issue @distantnative ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants