Skip to content
This repository was archived by the owner on Nov 13, 2024. It is now read-only.

Commit 1f3b1a4

Browse files
committed
修复 多余的命令执行错误
1 parent 7c85797 commit 1f3b1a4

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

src/entity/commands/docker/docker _resize.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,7 @@ export default class DockerResizeCommand extends InstanceCommand {
3535
}
3636

3737
async exec(instance: Instance, size?: IResizeOptions): Promise<any> {
38-
if (!instance.process) {
39-
instance.failure(new Error("命令执行失败,因为实例实际进程不存在."));
40-
}
41-
if (!(instance.config.processType === "docker")) {
42-
instance.failure(new Error("重设TTY大小失败,因为实例不是Docker容器."));
43-
}
38+
if (!instance.process || !(instance.config.processType === "docker")) return;
4439
const dockerProcess = <DockerProcessAdapter>instance.process;
4540
await dockerProcess.container.resize({
4641
h: size.h,

0 commit comments

Comments
 (0)