File tree 1 file changed +6
-4
lines changed
vjtop/src/main/java/com/vip/vjtools/vjtop
1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -92,14 +92,16 @@ public static void main(String[] args) {
92
92
}
93
93
94
94
// 5. console/cleanConsole mode start thread to get user input
95
- if (app . maxIterations == - 1 && format != OutputFormat .text ) {
95
+ if (format != OutputFormat .text ) {
96
96
InteractiveTask task = new InteractiveTask (app );
97
97
// 前台运行,接受用户输入时才启动交互进程
98
98
if (task .inputEnabled ()) {
99
99
view .displayCommandHints = true ;
100
- Thread interactiveThread = new Thread (task , "InteractiveThread" );
101
- interactiveThread .setDaemon (true );
102
- interactiveThread .start ();
100
+ if (app .maxIterations == -1 ) {
101
+ Thread interactiveThread = new Thread (task , "InteractiveThread" );
102
+ interactiveThread .setDaemon (true );
103
+ interactiveThread .start ();
104
+ }
103
105
} else {
104
106
// 后台运行,输出重定向到文件时,转为没有ansi码的干净模式
105
107
format = OutputFormat .cleanConsole ;
You can’t perform that action at this time.
0 commit comments