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

cli: fmt -check should return early on diff #16174

Merged
merged 2 commits into from
Feb 15, 2023
Merged

Commits on Feb 14, 2023

  1. cli: fmt -check should return early on diff

    The `nomad fmt -check` command incorrectly writes to file because we didn't
    return before writing the file on a diff. Fix this bug and update the command
    internals to differentiate between the write-to-file and write-to-stdout code
    paths, which are activated by different combinations of options and flags.
    
    The docstring for the `-list` and `-write` flags is also unclear and can be
    easily misread to be the opposite of the actual behavior. Clarify this and fix
    up the docs to match.
    
    This changeset also refactors the tests quite a bit so as to make the test
    outputs clear when something is incorrect.
    tgross committed Feb 14, 2023
    Configuration menu
    Copy the full SHA
    d9888d5 View commit details
    Browse the repository at this point in the history

Commits on Feb 15, 2023

  1. Configuration menu
    Copy the full SHA
    edd2e9d View commit details
    Browse the repository at this point in the history