Skip to content

Commit

Permalink
Fix URLGetter.py when default windows curl is used. (#816)
Browse files Browse the repository at this point in the history
Fix URLGetter for cases where default windows curl is used.
  • Loading branch information
jgstew committed Aug 2, 2022
1 parent c50919a commit 1aea1b6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Code/autopkglib/URLGetter.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import os.path
import subprocess

from autopkglib import Processor, ProcessorError, find_binary
from autopkglib import Processor, ProcessorError, find_binary, is_windows

__all__ = ["URLGetter"]

Expand Down Expand Up @@ -51,6 +51,9 @@ def curl_binary(self):

def prepare_curl_cmd(self):
"""Assemble basic curl command and return it."""
if is_windows() and "windows\\system32" in self.curl_binary().lower():
# if using windows default curl, --compressed is not supported
return [self.curl_binary(), "--location"]
return [self.curl_binary(), "--compressed", "--location"]

def add_curl_headers(self, curl_cmd, headers):
Expand Down

0 comments on commit 1aea1b6

Please sign in to comment.