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

Commit 1d22c8b

Browse files
committed
修复 resize 预设不存在
1 parent c7de9fa commit 1d22c8b

File tree

4 files changed

+5
-2
lines changed

4 files changed

+5
-2
lines changed

src/common/compress.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,3 +91,5 @@ async function _7zipDecompress(sourceZip: string, destDir: string) {
9191
});
9292
});
9393
}
94+
95+
async function linuxUnzip(sourceZip: string, destDir: string) {}

src/entity/commands/dispatcher.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ export default class FunctionDispatcher extends InstanceCommand {
6565
instance.setPreset("start", new GeneralStartCommand());
6666
}
6767
if (instance.config.processType === "docker") {
68+
instance.setPreset("resize", new DockerResizeCommand());
6869
instance.setPreset("start", new DockerStartCommand());
6970
}
7071

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export default class DockerResizeCommand extends InstanceCommand {
3737
async exec(instance: Instance, size?: IResizeOptions): Promise<any> {
3838
if (!instance.process || !(instance.config.processType === "docker")) return;
3939
const dockerProcess = <DockerProcessAdapter>instance.process;
40-
await dockerProcess.container.resize({
40+
await dockerProcess?.container?.resize({
4141
h: size.h,
4242
w: size.w
4343
});

src/routers/stream_router.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,6 @@ routerApp.on("stream/resize", async (ctx, data) => {
127127
const instance = InstanceSubsystem.getInstance(instanceUuid);
128128
if (instance.config.processType === "docker") await instance.execPreset("resize", data);
129129
} catch (error) {
130-
protocol.responseError(ctx, error);
130+
// protocol.responseError(ctx, error);
131131
}
132132
});

0 commit comments

Comments
 (0)