cli: require contract config file for bindings generation

It's an error if config file isn't provided and bindings config needs
to be generated.

Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
This commit is contained in:
Anna Shaleva 2023-05-16 14:00:44 +03:00
parent d493afc941
commit 3dbb733324

View file

@ -400,7 +400,8 @@ func contractCompile(ctx *cli.Context) error {
manifestFile := ctx.String("manifest")
confFile := ctx.String("config")
debugFile := ctx.String("debug")
if len(confFile) == 0 && (len(manifestFile) != 0 || len(debugFile) != 0) {
bindings := ctx.String("bindings")
if len(confFile) == 0 && (len(manifestFile) != 0 || len(debugFile) != 0 || len(bindings) != 0) {
return cli.NewExitError(errNoConfFile, 1)
}
@ -409,7 +410,7 @@ func contractCompile(ctx *cli.Context) error {
DebugInfo: debugFile,
ManifestFile: manifestFile,
BindingsFile: ctx.String("bindings"),
BindingsFile: bindings,
NoStandardCheck: ctx.Bool("no-standards"),
NoEventsCheck: ctx.Bool("no-events"),