Skip to content

Commit cdac1c4

Browse files
authored
Merge pull request #229 from m-jahn/fix_curl
fix: make curl requests failsafe against redirects, return error on fail
2 parents a2e013f + 0ec6220 commit cdac1c4

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ The client here will eventually be released as "spython" (and eventually to
1717
singularity on pypi), and the versions here will coincide with these releases.
1818

1919
## [master](https://github.com/singularityhub/singularity-cli/tree/master)
20+
- make curl requests failsafe against redirects, improved error on fail (0.3.15)
2021
- add stream_type to 'run' command like in 'exec' (0.3.14)
2122
- do not modify user provided instance name when generating new instance (0.3.13)
2223
- bug with instance.run_command (0.3.12)

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):

spython/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
66

77

8-
__version__ = "0.3.14"
8+
__version__ = "0.3.15"
99
AUTHOR = "Vanessa Sochat"
1010
AUTHOR_EMAIL = "[email protected]"
1111
NAME = "spython"

0 commit comments

Comments
 (0)