Make it clearer what the tar code does
This commit is contained in:
parent
12af311ce7
commit
5944b842de
@ -8,7 +8,7 @@ import pkg from "vs/platform/product/node/package";
|
|||||||
import product from "vs/platform/product/node/product";
|
import product from "vs/platform/product/node/product";
|
||||||
|
|
||||||
import { MainServer } from "vs/server/src/server";
|
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";
|
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");
|
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));
|
return buildVersionMessage(version, product.commit).split("\n").map((line) => logger.info(line));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
enableExtensionTars();
|
||||||
|
|
||||||
const shouldSpawnCliProcess = (): boolean => {
|
const shouldSpawnCliProcess = (): boolean => {
|
||||||
return !!args["install-source"]
|
return !!args["install-source"]
|
||||||
|| !!args["list-extensions"]
|
|| !!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.
|
/**
|
||||||
|
* 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;
|
const target = vszip as typeof vszip;
|
||||||
target.zip = tar;
|
target.zip = tar;
|
||||||
target.extract = extract;
|
target.extract = extract;
|
||||||
target.buffer = buffer;
|
target.buffer = buffer;
|
||||||
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user