Merge pull request #1659 from bas-vk/exec-output

Javascript --exec output
pull/1667/head
Jeffrey Wilcke 9 years ago
commit 5c5c3930b7
  1. 7
      cmd/geth/js.go

@ -228,15 +228,10 @@ func (self *jsre) loadAutoCompletion() {
}
func (self *jsre) batch(statement string) {
val, err := self.re.Run(statement)
err := self.re.EvalAndPrettyPrint(statement)
if err != nil {
fmt.Printf("error: %v", err)
} else if val.IsDefined() && val.IsObject() {
obj, _ := self.re.Get("ret_result")
fmt.Printf("%v", obj)
} else if val.IsDefined() {
fmt.Printf("%v", val)
}
if self.atexit != nil {

Loading…
Cancel
Save