remove installDependencies

This commit is contained in:
David Blass
2025-11-13 10:53:53 -05:00
parent 515bd3a9d7
commit 203e9ef8cd
3 changed files with 2 additions and 41 deletions
-20
View File
@@ -39,12 +39,10 @@ export async function installFromNpmTarball({
packageName,
version,
executablePath,
installDependencies = false,
}: {
packageName: string;
version: string;
executablePath: string;
installDependencies?: boolean;
}): Promise<string> {
// Resolve version if it's a range or "latest"
let resolvedVersion = version;
@@ -123,24 +121,6 @@ export async function installFromNpmTarball({
throw new Error(`Executable not found in extracted package at ${cliPath}`);
}
// Install dependencies if requested and package.json exists
if (installDependencies) {
const packageJsonPath = join(extractedDir, "package.json");
if (existsSync(packageJsonPath)) {
log.info(`Installing dependencies for ${packageName}...`);
const installResult = spawnSync("npm", ["install", "--production"], {
cwd: extractedDir,
stdio: "pipe",
encoding: "utf-8",
});
if (installResult.status !== 0) {
throw new Error(
`Failed to install dependencies: ${installResult.stderr || installResult.stdout || "Unknown error"}`
);
}
}
}
log.info(`${packageName} installed at ${cliPath}`);
return cliPath;