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

Smaller fixes to support upcoming commits #1664

Merged
merged 3 commits into from
Sep 10, 2024
Merged

Commits on Sep 9, 2024

  1. fix: Add missing help for resume command.

    No changelog needed, because `resume` has not been released yet.
    
    Changelog: None
    Ticket: None
    
    Signed-off-by: Kristian Amlie <kristian.amlie@northern.tech>
    kacf committed Sep 9, 2024
    Configuration menu
    Copy the full SHA
    8cf6481 View commit details
    Browse the repository at this point in the history
  2. refac: Fix confusing parsing interface and associated code.

    This was my own mistake, but it's an easy one to
    make. `CmdlineOptionsIterator` takes two arguments, options with
    values, and options without values. However the two functions
    `CommandOptsSetWithValue` and `CommandOptsSetWithoutValue` will filter
    and construct the correct lists from one single list of options, but
    it's easy to conclude that the options need to be kept in separate
    lists. This was made even more confusing by the call sites not passing
    in this one list consistently, but instead passing it in depending on
    whether that particular command has arguments or not. This is not
    necessary, since the two aforementioned functions would automagically
    construct the correct (empty) lists based on filtering.
    
    Simplify this, and give the constructor one argument instead, the full
    list of options, and then it can itself do the filtering, so that it
    doesn't look like we are using two different lists from call sites.
    
    This removes the need for the `options_w_values` list.
    
    Signed-off-by: Kristian Amlie <kristian.amlie@northern.tech>
    kacf committed Sep 9, 2024
    Configuration menu
    Copy the full SHA
    ee0faca View commit details
    Browse the repository at this point in the history
  3. chore: Remove redundant type specifier.

    Signed-off-by: Kristian Amlie <kristian.amlie@northern.tech>
    kacf committed Sep 9, 2024
    Configuration menu
    Copy the full SHA
    bdd9566 View commit details
    Browse the repository at this point in the history