未验证 提交 5944b842 编写于 作者: A Asher

Make it clearer what the tar code does

上级 12af311c
......@@ -8,7 +8,7 @@ import pkg from "vs/platform/product/node/package";
import product from "vs/platform/product/node/product";
import { MainServer } from "vs/server/src/server";
import "vs/server/src/tar";
import { enableExtensionTars } from "vs/server/src/tar";
import { AuthType, buildAllowedMessage, generateCertificate, generatePassword, localRequire, open, unpackExecutables } from "vs/server/src/util";
const { logger } = localRequire<typeof import("@coder/logger/out/index")>("@coder/logger/out/index");
......@@ -96,6 +96,8 @@ const main = async (): Promise<void | void[]> => {
return buildVersionMessage(version, product.commit).split("\n").map((line) => logger.info(line));
}
enableExtensionTars();
const shouldSpawnCliProcess = (): boolean => {
return !!args["install-source"]
|| !!args["list-extensions"]
......
......@@ -153,8 +153,13 @@ const extractTar = async (tarPath: string, targetPath: string, options: IExtract
});
};
// Override original functionality so we can use tar instead of zip.
const target = vszip as typeof vszip;
target.zip = tar;
target.extract = extract;
target.buffer = buffer;
/**
* Override original functionality so we can use extensions that are in a tar in
* addition to zips.
*/
export const enableExtensionTars = (): void => {
const target = vszip as typeof vszip;
target.zip = tar;
target.extract = extract;
target.buffer = buffer;
};
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册