diff --git a/cli/smartcontract/smart_contract.go b/cli/smartcontract/smart_contract.go index 8501153b8..2dd69bf94 100644 --- a/cli/smartcontract/smart_contract.go +++ b/cli/smartcontract/smart_contract.go @@ -254,6 +254,8 @@ func inspect(ctx *cli.Context) error { if len(src) == 0 { return cli.NewExitError(errNoInput, 1) } - compiler.CompileAndInspect(src) + if err := compiler.CompileAndInspect(src); err != nil { + return cli.NewExitError(err, 1) + } return nil }