From 923fb22d7957238069b078b52a530b48f4705d11 Mon Sep 17 00:00:00 2001 From: Alex Klibisz Date: Thu, 29 Aug 2024 17:07:50 -0400 Subject: [PATCH] Build: fix the Elasticsearch download URL so it works on Linux (#725) --- project/ElasticsearchPluginPlugin.scala | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/project/ElasticsearchPluginPlugin.scala b/project/ElasticsearchPluginPlugin.scala index fc0d6bd27..923ce363e 100644 --- a/project/ElasticsearchPluginPlugin.scala +++ b/project/ElasticsearchPluginPlugin.scala @@ -8,9 +8,9 @@ import java.util.zip.GZIPInputStream import scala.sys.process.Process /** SBT plugin providing functionality to run and build an Elasticsearch plugin. Also see: - * https://github.com/elastic/elasticsearch/blob/7ad3cf0d34/build-tools/src/main/java/org/elasticsearch/gradle/plugin/PluginBuildPlugin.java, - * build.sbt file in https://github.com/shikhar/eskka - */ + * https://github.com/elastic/elasticsearch/blob/7ad3cf0d34/build-tools/src/main/java/org/elasticsearch/gradle/plugin/PluginBuildPlugin.java, + * build.sbt file in https://github.com/shikhar/eskka + */ object ElasticsearchPluginPlugin extends AutoPlugin { override val trigger = noTrigger @@ -132,7 +132,7 @@ object ElasticsearchPluginPlugin extends AutoPlugin { val log = sLog.value val elasticsearchVersionSuffix = { val osName = System.getProperty("os.name").toLowerCase() - val arch = System.getProperty("os.arch") + val arch = if (System.getProperty("os.arch") == "amd64") "x86_64" else System.getProperty("os.arch") if (osName.contains("mac")) s"darwin-$arch" else if (osName.contains("nix") || osName.contains("nux")) s"linux-$arch" else throw new RuntimeException(s"Unsupported operating system $osName, $arch")