Skip to content

Commit

Permalink
fix(cmd): properly pick up --inverse and --cid-file args
Browse files Browse the repository at this point in the history
rvagg committed Sep 9, 2024
1 parent 3a4d09b commit aa5eb74
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cmd/car/filter.go
Original file line number Diff line number Diff line change
@@ -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) {

0 comments on commit aa5eb74

Please sign in to comment.