core: 修复在non-term环境下首次运行的错误

This commit is contained in:
undefined committed 2021-01-18 12:23:28 +08:00
1 parent 84d7e1b95d
commit 02e6cede3d
1 file changed
+5 -2
+5 -2
View File
@@ -4,6 +4,7 @@ import cluster from 'cluster';
import {
terminal, TextBox, LabeledInput,
} from 'terminal-kit';
import { ProgressBarOptions } from 'terminal-kit/Terminal';
import { argv } from 'yargs';
import * as bus from './service/bus';
@@ -29,10 +30,12 @@ export namespace Progress {
console.log('done: ', this.args, args);
}
stop: () => {}
stop() {
console.log('stop', this.args);
}
}
export function create(args) {
export function create(args: ProgressBarOptions) {
// TODO handle worker process
return useTerminal
? terminal.progressBar(args)