Skip to content

Self-hosted, plugin-based server management.

fix: start npm through a shell in the windows sharp install

LukeGus1533c6837ae4
diff --git a/scripts/install-windows-sharp.cjs b/scripts/install-windows-sharp.cjs
index 1a6a1391e..272073281 100644
--- a/scripts/install-windows-sharp.cjs
+++ b/scripts/install-windows-sharp.cjs
@@ -21,6 +21,8 @@ const packages = [
"@img/sharp-win32-x64",
].map((name) => `${name}@${sharpPackage.optionalDependencies[name]}`);
+// A .cmd file only starts through a shell on current Node.
execFileSync("npm.cmd", ["install", "--force", "--no-save", ...packages], {
stdio: "inherit",
+ shell: true,
});