Skip to content

Commit aa07aeb

Browse files
authored
Adding pcre2 dependency for >= 1.8 (#23)
1 parent 8f7665d commit aa07aeb

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

index.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,9 +120,13 @@ async function installCrystalForLinux({crystal, shards, arch = getArch(), path})
120120
const filePatterns = {"x86_64": /-linux-x86_64\.tar\.gz$/, "x86": /-linux-i686\.tar\.gz$/};
121121
checkArch(arch, Object.keys(filePatterns));
122122

123-
const depsTask = installAptPackages(
124-
"libevent-dev libgmp-dev libpcre3-dev libssl-dev libxml2-dev libyaml-dev".split(" "),
125-
);
123+
let packages = "libevent-dev libgmp-dev libpcre3-dev libssl-dev libxml2-dev libyaml-dev".split(" ");
124+
if (crystal === Latest || crystal === Nightly || cmpTags(crystal, "1.8") >= 0) {
125+
packages.push("libpcre2-dev");
126+
}
127+
128+
const depsTask = installAptPackages(packages);
129+
126130
await installBinaryRelease({crystal, shards, filePattern: filePatterns[arch], path});
127131

128132
Core.info("Setting up environment for Crystal");

0 commit comments

Comments
 (0)