File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -495,17 +495,17 @@ var allocateCmd = &cli.Command{
495
495
496
496
pieceFile := cctx .String ("piece-file" )
497
497
miners := cctx .StringSlice ("miner" )
498
- pcids := cctx .StringSlice ("piece-cid" )
498
+ pcids := cctx .String ("piece-cid" )
499
499
500
- if pieceFile == "" && len ( pcids ) < 1 {
500
+ if pieceFile == "" && pcids == "" {
501
501
return fmt .Errorf ("must provide at least one --piece-cid or use --piece-file" )
502
502
}
503
503
504
504
if pieceFile == "" && len (miners ) < 1 {
505
505
return fmt .Errorf ("must provide at least one miner address or use --piece-file" )
506
506
}
507
507
508
- if pieceFile != "" && len ( pcids ) > 0 {
508
+ if pieceFile != "" && pcids != "" {
509
509
return fmt .Errorf ("cannot use both --piece-cid and --piece-file flags at once" )
510
510
}
511
511
You can’t perform that action at this time.
0 commit comments