MCPcopy Create free account
hub / github.com/MCSManager/MCSManager / initSteamCmd

Function initSteamCmd

daemon/src/tools/steam_cmd.ts:10–20  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

8import { getCommonHeaders } from "../common/network";
9
10export async function initSteamCmd() {
11 try {
12 if (!fs.existsSync(STEAM_CMD_PATH) && SYSTEM_TYPE === "win32") {
13 const zipPath = await downloadSteam(WINDOWS_STEAM_CMD_URL);
14 await new FileManager().unzip(zipPath, "lib", "utf-8");
15 await fs.remove(zipPath);
16 }
17 } catch (error) {
18 logger.error(`Steam command line tool download failed: ${error}`);
19 }
20}
21
22export async function downloadSteam(url: string): Promise<string> {
23 const tmpPath = path.normalize(path.join(process.cwd(), "lib", "tmp_steamcmd.zip"));

Callers 1

checkDependenciesFunction · 0.90

Calls 3

downloadSteamFunction · 0.85
unzipMethod · 0.80
errorMethod · 0.80

Tested by

no test coverage detected