From 8f283164ff4fce1facd5f1b553df7dec4640b130 Mon Sep 17 00:00:00 2001 From: Aleksei Magusev <248290+lexmag@users.noreply.github.com> Date: Tue, 12 Dec 2023 02:56:10 -0800 Subject: [PATCH] Fully spell out the network command options (#64) --- lib/xla.ex | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/xla.ex b/lib/xla.ex index c2d0025..0accf87 100644 --- a/lib/xla.ex +++ b/lib/xla.ex @@ -244,8 +244,8 @@ defmodule XLA do defp download(url, dest) do command = case network_tool() do - :curl -> "curl --fail -L -o #{dest} #{curl_options()} #{url}" - :wget -> "wget -O #{dest} #{wget_options()} #{url}" + :curl -> "curl --fail --location --output #{dest} #{curl_options()} #{url}" + :wget -> "wget --output-document=#{dest} #{wget_options()} #{url}" end case System.shell(command) do @@ -257,8 +257,8 @@ defmodule XLA do defp get(url) do command = case network_tool() do - :curl -> "curl --fail --silent -L #{curl_options()} #{url}" - :wget -> "wget -q -O - #{wget_options()} #{url}" + :curl -> "curl --fail --silent --location #{curl_options()} #{url}" + :wget -> "wget --quiet --output-document=- #{wget_options()} #{url}" end case System.shell(command) do @@ -289,7 +289,7 @@ defmodule XLA do defp curl_options() do headers = http_headers() - Enum.map_join(headers, " ", &"-H '#{&1}'") + Enum.map_join(headers, " ", &"--header '#{&1}'") end defp wget_options() do