提交 51a9aa71 编写于 作者: D Derek Parker

Fix: Exit on EOF

上级 3ffbe2d7
......@@ -72,10 +72,6 @@ func (t *Term) Run() (error, int) {
for {
cmdstr, err := t.promptForInput()
if len(cmdstr) == 0 {
continue
}
if err != nil {
if err == io.EOF {
err, status = handleExit(t.client, t)
......@@ -83,6 +79,9 @@ func (t *Term) Run() (error, int) {
err, status = fmt.Errorf("Prompt for input failed.\n"), 1
break
}
if len(cmdstr) == 0 {
continue
}
cmdstr, args := parseCommand(cmdstr)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册