mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 17:36:08 +08:00
core: 修复在non-term环境下首次运行的错误
This commit is contained in:
1 parent
84d7e1b95d
commit
02e6cede3d
1 file changed
+5
-2
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user