django-click commands do not accept `base_stealth_options`
Django commands by default support the options skip_checks, stderr, and stdout. However, django-click commands do not. This incompatibility with the basic command contract causes problems particularly in testing.
Howdy @DMR-coding - is there anywhere in the documentation where I can see more information on this? I don't see any details here:
https://docs.djangoproject.com/en/3.0/howto/custom-management-commands/
Or is this part of the API that isn't documented?
I see --skip-checks supported since Django 3.0 on certain commands, but not on custom commands. Thanks for the heads up!
I'm afraid it's been a long enough time since the initial writing that I don't remember where to find any documentation on the matter, if any, and some quick research didn't turn it up.
These are called "stealth options" in the code; they're defined here: https://github.com/django/django/blob/c60524c658f197f645b638f9bcc553103bfe2630/django/core/management/base.py#L235
(skip_checks is no longer one of the base_stealth_options as of 3.0)
It seems the lack of stealth options "stdout" and "stderr" makes django-click incompatible with non-CLI runners which use these to capture the output from the command. e.g. django-executor, django-admintool-command , and probably django-chroniker but I havent tried that yet
It looks like current versions of Django only support stdout and stderr as stealth options. Just noting here:
https://github.com/django/django/blob/master/django/core/management/base.py#L235
Do we just need to add them here? https://github.com/GaretJax/django-click/blob/master/djclick/adapter.py#L40