Skip to content

Commit 8e70ecc

Browse files
committed
Delete pre-packaged Shards if it's not requested also on Windows
1 parent e6214c2 commit 8e70ecc

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

index.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -399,13 +399,18 @@ async function downloadCrystalNightly(suffix) {
399399
return onlySubdir(extractedPath);
400400
}
401401

402-
async function installCrystalForWindows({crystal, arch = "x86_64", path}) {
402+
async function installCrystalForWindows({crystal, shards, arch = "x86_64", path}) {
403403
checkVersion(crystal, [Nightly]);
404404
checkArch(arch, ["x86_64"]);
405405
await IO.mv(await downloadCrystalNightlyForWindows(), path);
406406

407407
Core.info("Setting up environment for Crystal");
408408
Core.addPath(path);
409+
if (shards !== Any) {
410+
try {
411+
await FS.unlink(Path.join(path, "shards.exe"));
412+
} catch (e) {}
413+
}
409414
}
410415

411416
async function downloadCrystalNightlyForWindows() {

0 commit comments

Comments
 (0)