diff options
author | Jeffrey Wilcke <jeffrey@ethereum.org> | 2015-03-27 04:08:15 +0800 |
---|---|---|
committer | Jeffrey Wilcke <jeffrey@ethereum.org> | 2015-03-27 04:08:15 +0800 |
commit | 829240c3252d9da09c9000e42b0686425a313e8b (patch) | |
tree | 5b5fe5aeb443a8fd8a325743490b8fb416a903d3 /cmd/ethereum/js.go | |
parent | 658204bafcba6332e979aee690dc5cff6e46fb42 (diff) | |
parent | 7577d1261403dbabdb30e21415d34b4e5da466ec (diff) | |
download | go-tangerine-829240c3252d9da09c9000e42b0686425a313e8b.tar go-tangerine-829240c3252d9da09c9000e42b0686425a313e8b.tar.gz go-tangerine-829240c3252d9da09c9000e42b0686425a313e8b.tar.bz2 go-tangerine-829240c3252d9da09c9000e42b0686425a313e8b.tar.lz go-tangerine-829240c3252d9da09c9000e42b0686425a313e8b.tar.xz go-tangerine-829240c3252d9da09c9000e42b0686425a313e8b.tar.zst go-tangerine-829240c3252d9da09c9000e42b0686425a313e8b.zip |
Merge pull request #550 from ethersphere/frontier/cli-key
import/export accounts
Diffstat (limited to 'cmd/ethereum/js.go')
-rw-r--r-- | cmd/ethereum/js.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cmd/ethereum/js.go b/cmd/ethereum/js.go index 1f0033daa..8e88a1c54 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() @@ -102,7 +102,7 @@ func (js *jsre) apiBindings() { jethObj := t.Object() jethObj.Set("send", jeth.Send) - err := js.re.Compile("bignum.js", re.BigNumber_JS) + err := js.re.Compile("bignumber.js", re.BigNumber_JS) if err != nil { utils.Fatalf("Error loading bignumber.js: %v", err) } |