aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/ethereum/js.go
diff options
context:
space:
mode:
authorzelig <viktor.tron@gmail.com>2015-03-24 22:09:06 +0800
committerzelig <viktor.tron@gmail.com>2015-03-27 03:00:18 +0800
commit1c4c71dcff442e3ae30e510fef312d3c05341f30 (patch)
tree11ac27da8c937cd372d5c811442281fea4accd2d /cmd/ethereum/js.go
parentfd8d18ec280c3fe2c3d2651870c31c65b02039ba (diff)
downloaddexon-1c4c71dcff442e3ae30e510fef312d3c05341f30.tar
dexon-1c4c71dcff442e3ae30e510fef312d3c05341f30.tar.gz
dexon-1c4c71dcff442e3ae30e510fef312d3c05341f30.tar.bz2
dexon-1c4c71dcff442e3ae30e510fef312d3c05341f30.tar.lz
dexon-1c4c71dcff442e3ae30e510fef312d3c05341f30.tar.xz
dexon-1c4c71dcff442e3ae30e510fef312d3c05341f30.tar.zst
dexon-1c4c71dcff442e3ae30e510fef312d3c05341f30.zip
cli: fix liner not closing (spuriously opened) in noninteractive jsre
Diffstat (limited to 'cmd/ethereum/js.go')
-rw-r--r--cmd/ethereum/js.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/cmd/ethereum/js.go b/cmd/ethereum/js.go
index 1f0033daa..599af0a16 100644
--- a/cmd/ethereum/js.go
+++ b/cmd/ethereum/js.go
@@ -67,14 +67,14 @@ type jsre struct {
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.xeth = xeth.New(ethereum, js)
js.re = re.New(libPath)
js.apiBindings()
js.adminBindings()
- if !liner.TerminalSupported() {
+ if !liner.TerminalSupported() || !interactive {
js.prompter = dumbterm{bufio.NewReader(os.Stdin)}
} else {
lr := liner.NewLiner()