Cleanup - detached commands should get config passed to them
With #1231 the doctor command now uses the config when run in a non-detached manor. But since doctor is a detached command it doesn't get the config from the CLIs main loadConfig call passed to it. So, doctor ends up having to call loadConfig again.
This is mostly just a minor performance issue. But we could fix it by passing the config along to detached commands, -- or null if it is running detached. I don't think this would be a compat issue, since all the detached commands are internal to the CLI currently.
Sounds good. I'll tackle it while working on my commander update.
Update: Right now, doctor command added certain properties to config, such as healthchecks that can be set by user/dependency.
The idea here would be to provide a new function on top of loadConfig, called loadUserConfig or loadAdditionalConfig that would allow loading a custom, command-specific, additional properties, without needing to update the main package.
If, a doctor commandwants to use and set an additionalhealth checksvalue, it doesn't need to interfere withconfig` (main), it can simply use that function instead.
#1527 as it's related.
There hasn't been any activity on this issue in the past 3 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 7 days.