DEV: Re-allow node 17, with a warning (#15083)

This commit is contained in:
Jarek Radosz
2021-11-24 21:16:33 +01:00
committed by GitHub
parent e41f98bf96
commit de3680eb5c
11 changed files with 20 additions and 10 deletions

View File

@@ -26,6 +26,10 @@ class String
def cyan
"\e[36m#{self}\e[0m"
end
def red
"\033[31m#{self}\e[0m"
end
end
if ARGV.include?("-h") || ARGV.include?("--help")
@@ -48,6 +52,12 @@ end
exit 1 if !system "yarn -s install --cwd #{yarn_dir}"
if !system("node -p 'require(\"crypto\").createHash(\"md4\")'", out: "/dev/null", err: "/dev/null")
$stderr << "#{"ERROR".red}: Node 17 with OpenSSL 3 is currently unsupported\n"
$stderr << "Please use node LTS (16.x) instead\n"
exit 1
end
if ARGV.include?("-u") || ARGV.include?("--unicorn")
unicorn_env = { "DISCOURSE_PORT" => ENV["DISCOURSE_PORT"] || "4200" }
unicorn_pid = spawn(unicorn_env, __dir__ + "/unicorn")