Skip to content

Commit 7dfdfcd

Browse files
committed
fix: make curl requests failsafe against redirects, return error on fail
1 parent a2e013f commit 7dfdfcd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

spython/main/parse/parsers/docker.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,8 @@ def _parse_http(self, url, dest):
332332
"""
333333
file_name = os.path.basename(url)
334334
download_path = "%s/%s" % (dest, file_name)
335-
command = "curl %s -o %s" % (url, download_path)
335+
curl_flags = "-L --retry 1 --fail --show-error"
336+
command = "curl %s %s -o %s" % (curl_flags, url, download_path)
336337
self.recipe[self.active_layer].install.append(command)
337338

338339
def _parse_archive(self, targz, dest):

0 commit comments

Comments
 (0)