|
|
@ -67,14 +67,14 @@ type jsre struct { |
|
|
|
prompter |
|
|
|
prompter |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
func newJSRE(ethereum *eth.Ethereum, libPath string) *jsre { |
|
|
|
func newJSRE(ethereum *eth.Ethereum, libPath string, interactive bool) *jsre { |
|
|
|
js := &jsre{ethereum: ethereum, ps1: "> "} |
|
|
|
js := &jsre{ethereum: ethereum, ps1: "> "} |
|
|
|
js.xeth = xeth.New(ethereum, js) |
|
|
|
js.xeth = xeth.New(ethereum, js) |
|
|
|
js.re = re.New(libPath) |
|
|
|
js.re = re.New(libPath) |
|
|
|
js.apiBindings() |
|
|
|
js.apiBindings() |
|
|
|
js.adminBindings() |
|
|
|
js.adminBindings() |
|
|
|
|
|
|
|
|
|
|
|
if !liner.TerminalSupported() { |
|
|
|
if !liner.TerminalSupported() || !interactive { |
|
|
|
js.prompter = dumbterm{bufio.NewReader(os.Stdin)} |
|
|
|
js.prompter = dumbterm{bufio.NewReader(os.Stdin)} |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
lr := liner.NewLiner() |
|
|
|
lr := liner.NewLiner() |
|
|
|