aboutsummaryrefslogtreecommitdiffstats
path: root/internal/jsre/jsre.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/jsre/jsre.go')
-rw-r--r--internal/jsre/jsre.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/jsre/jsre.go b/internal/jsre/jsre.go
index 8d8f4fc2a..a95efd379 100644
--- a/internal/jsre/jsre.go
+++ b/internal/jsre/jsre.go
@@ -303,11 +303,11 @@ func (self *JSRE) Evaluate(code string, w io.Writer) error {
self.Do(func(vm *otto.Otto) {
val, err := vm.Run(code)
if err != nil {
- fail = err
+ prettyError(vm, err, w)
} else {
prettyPrint(vm, val, w)
- fmt.Fprintln(w)
}
+ fmt.Fprintln(w)
})
return fail
}