Skip to content

Add a check mode #49

@mmhat

Description

@mmhat

Is it possible to have a check mode, that tells you whether a given GHC version is in the get-tested stanza of a Cabal file or not?
What I mean is something like this:

$ get-tested get-tested.cabal
["9.10.1"]
$ get-tested check get-tested.cabal 9.10.1; echo $?
0
$ get-tested check get-tested.cabal 9.8.2; echo $?
1
$ get-tested check get-tested.cabal 9.8.2 9.10.1; echo $?
1

I know I can work around that (e.g. get-tested get-tested.cabal | jq --raw-output '.[]' | grep -q '9.10.1'), but that's rather hacky...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions