Merge pull request #7560 from EmadMF/emad22552-patch-1
add check manual-stateless-deal with interactive deal making
This commit is contained in:
		
						commit
						74e6260fbd
					
				| @ -358,7 +358,13 @@ The minimum value is 518400 (6 months).`, | ||||
| 		&CidBaseFlag, | ||||
| 	}, | ||||
| 	Action: func(cctx *cli.Context) error { | ||||
| 
 | ||||
| 		expectedArgsMsg := "expected 4 args: dataCid, miner, price, duration" | ||||
| 
 | ||||
| 		if !cctx.Args().Present() { | ||||
| 			if cctx.Bool("manual-stateless-deal") { | ||||
| 				return xerrors.New("--manual-stateless-deal can not be combined with interactive deal mode: you must specify the " + expectedArgsMsg) | ||||
| 			} | ||||
| 			return interactiveDeal(cctx) | ||||
| 		} | ||||
| 
 | ||||
| @ -371,7 +377,7 @@ The minimum value is 518400 (6 months).`, | ||||
| 		afmt := NewAppFmt(cctx.App) | ||||
| 
 | ||||
| 		if cctx.NArg() != 4 { | ||||
| 			return xerrors.New("expected 4 args: dataCid, miner, price, duration") | ||||
| 			return xerrors.New(expectedArgsMsg) | ||||
| 		} | ||||
| 
 | ||||
| 		// [data, miner, price, dur]
 | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user