mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-24 21:56:43 +00:00
geth/js: bugfix, geth would not stop after the js subcommand
This commit is contained in:
parent
787d71d659
commit
86851a7192
2 changed files with 4 additions and 10 deletions
|
|
@ -378,15 +378,6 @@ func (self *jsre) UnlockAccount(addr []byte) bool {
|
|||
}
|
||||
}
|
||||
|
||||
func (self *jsre) exec(filename string) error {
|
||||
if err := self.re.Exec(filename); err != nil {
|
||||
self.re.Stop(false)
|
||||
return fmt.Errorf("Javascript Error: %v", err)
|
||||
}
|
||||
self.re.Stop(true)
|
||||
return nil
|
||||
}
|
||||
|
||||
func (self *jsre) interactive() {
|
||||
// Read input lines.
|
||||
prompt := make(chan string)
|
||||
|
|
|
|||
|
|
@ -460,7 +460,10 @@ func execScripts(ctx *cli.Context) {
|
|||
client, false, nil)
|
||||
|
||||
for _, file := range ctx.Args() {
|
||||
repl.exec(file)
|
||||
if err := repl.re.Exec(file); err != nil {
|
||||
fmt.Errorf("Javascript Error: %v", err)
|
||||
break
|
||||
}
|
||||
}
|
||||
node.Stop()
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue