Skip to content

Commit

Permalink
sync: allow passing both -uy and --tests include|exclude (#674)
Browse files Browse the repository at this point in the history
Before this commit:

    $ configlet sync -uy --docs --tests include
    Error: '-y, --yes' was provided to non-interactively update, but the tests updating mode is still 'choose'.

With this commit:

    $ configlet sync -uy --docs --tests include
    Updating cached 'problem-specifications' data...
    Checking exercises...
    Every exercise has up-to-date docs!
    Every exercise has up-to-date tests!

Fixes: #673
  • Loading branch information
ee7 authored Oct 11, 2022
1 parent 8d0c809 commit d5f5485
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/sync/sync.nim
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ proc validate(conf: Conf) =
## Exits with an error message if the given `conf` contains an invalid
## combination of options.
if conf.action.update:
if conf.action.yes and skTests in conf.action.scope:
if conf.action.yes and skTests in conf.action.scope and conf.action.tests == tmChoose:
let msg = fmt"""
'{list(optFmtSyncYes)}' was provided to non-interactively update, but the tests updating mode is still 'choose'.
You can either:
Expand Down

0 comments on commit d5f5485

Please sign in to comment.