aboutsummaryrefslogtreecommitdiffstats
path: root/ethutil
diff options
context:
space:
mode:
Diffstat (limited to 'ethutil')
-rw-r--r--ethutil/script.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/ethutil/script.go b/ethutil/script.go
index aaa0f8ed8..f5c53f84c 100644
--- a/ethutil/script.go
+++ b/ethutil/script.go
@@ -9,11 +9,11 @@ import (
)
// General compile function
-func Compile(script string) (ret []byte, err error) {
+func Compile(script string, silent bool) (ret []byte, err error) {
if len(script) > 2 {
line := strings.Split(script, "\n")[0]
- if line[0:2] == "#!" {
+ if len(line) > 1 && line[0:2] == "#!" {
switch line {
case "#!serpent":
byteCode, err := serpent.Compile(script)
@@ -26,6 +26,7 @@ func Compile(script string) (ret []byte, err error) {
} else {
compiler := mutan.NewCompiler(backend.NewEthereumBackend())
+ compiler.Silent = silent
byteCode, errors := compiler.Compile(strings.NewReader(script))
if len(errors) > 0 {
var errs string