From aa5eb74d4c7ffc92520be10431ac4079e3c35f0d Mon Sep 17 00:00:00 2001 From: Rod Vagg Date: Mon, 9 Sep 2024 20:25:30 +1000 Subject: [PATCH] fix(cmd): properly pick up --inverse and --cid-file args --- cmd/car/filter.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/car/filter.go b/cmd/car/filter.go index d4c6c1d..bbc2edb 100644 --- a/cmd/car/filter.go +++ b/cmd/car/filter.go @@ -21,8 +21,8 @@ func FilterCar(c *cli.Context) error { var err error // Get the set of CIDs from stdin. inStream := os.Stdin - if c.IsSet("cidFile") { - inStream, err = os.Open(c.String("cidFile")) + if c.IsSet("cid-file") { + inStream, err = os.Open(c.String("cid-file")) if err != nil { return err } @@ -38,7 +38,7 @@ func FilterCar(c *cli.Context) error { fmt.Printf("filtering to %d cids\n", len(cidMap)) } - return lib.FilterCar(c.Context, c.Args().First(), c.Args().Get(1), cidMap, c.Bool("invert"), c.Int("version"), c.Bool("append")) + return lib.FilterCar(c.Context, c.Args().First(), c.Args().Get(1), cidMap, c.Bool("inverse"), c.Int("version"), c.Bool("append")) } func parseCIDS(r io.Reader) (map[cid.Cid]struct{}, error) {