mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-18 01:43:47 +00:00
cmd/abigen: make --combined-json, --abi mutually exclusive. Require at least one of them to be set.
This commit is contained in:
parent
7c763c5e54
commit
79e091c61f
1 changed files with 6 additions and 2 deletions
|
|
@ -98,8 +98,12 @@ func abigen(c *cli.Context) error {
|
||||||
if c.String(pkgFlag.Name) == "" {
|
if c.String(pkgFlag.Name) == "" {
|
||||||
utils.Fatalf("No destination package specified (--pkg)")
|
utils.Fatalf("No destination package specified (--pkg)")
|
||||||
}
|
}
|
||||||
if c.String(abiFlag.Name) == "" {
|
if c.String(abiFlag.Name) == "" && c.String(jsonFlag.Name) == "" {
|
||||||
utils.Fatalf("No contract ABI source specified (--abi)")
|
utils.Fatalf("Either contract ABI source (--abi) or combined-json (--combined-json) are required")
|
||||||
|
}
|
||||||
|
|
||||||
|
if c.String(abiFlag.Name) != "" && c.String(jsonFlag.Name) != "" {
|
||||||
|
utils.Fatalf("contract ABI source (--abi) and combined-json (--combined-json) are mutually-exclusive")
|
||||||
}
|
}
|
||||||
var lang bind.Lang
|
var lang bind.Lang
|
||||||
switch c.String(langFlag.Name) {
|
switch c.String(langFlag.Name) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue