diff --git a/lib/language_pack/helpers/node_installer.rb b/lib/language_pack/helpers/node_installer.rb index 16e7eb9d9..7dfecb172 100644 --- a/lib/language_pack/helpers/node_installer.rb +++ b/lib/language_pack/helpers/node_installer.rb @@ -9,7 +9,7 @@ def initialize end def binary_path - node_folder(@version) + File.basename(@url).delete_suffix(".tar.gz") end def install @@ -27,9 +27,4 @@ def install FileUtils.mv("#{dir}/#{node_bin}", ".") end end - - private - def node_folder(version) - "node-v#{version}-linux-x64" - end end diff --git a/lib/language_pack/helpers/nodebin.rb b/lib/language_pack/helpers/nodebin.rb index 1a5c194f9..ac7c13e6d 100644 --- a/lib/language_pack/helpers/nodebin.rb +++ b/lib/language_pack/helpers/nodebin.rb @@ -3,11 +3,12 @@ class LanguagePack::Helpers::Nodebin NODE_VERSION = "20.9.0" YARN_VERSION = "1.22.19" + ARCH = RUBY_PLATFORM.start_with?(/aarch64|arm64/) ? "arm64" : "x64" def self.hardcoded_node_lts { "number" => NODE_VERSION, - "url" => "https://heroku-nodebin.s3.us-east-1.amazonaws.com/node/release/linux-x64/node-v#{NODE_VERSION}-linux-x64.tar.gz" + "url" => "https://nodejs.org/download/release/v#{NODE_VERSION}/node-v#{NODE_VERSION}-linux-#{ARCH}.tar.gz", } end