Skip to content

Cleanup - detached commands should get config passed to them #1261

Closed

Description

@acoates-ms

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.

Activity

  1. grabbou commented on Nov 26, 2020

    @grabbou
    Member

    Sounds good. I'll tackle it while working on my commander update.

  2. grabbou commented on Jan 26, 2022

    @grabbou
    Member

    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.

  3. self-assigned this
    on Jan 26, 2022
  4. grabbou commented on Jan 26, 2022

    @grabbou
    Member

    #1527 as it's related.

  5. github-actions commented on Nov 27, 2022

    @github-actions

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions