File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1717 " Fetch URL and safe it to FILE."
1818 (declare (ignorable args))
1919 (if (uiop :string-prefix-p " https://" url)
20- (let ((output (uiop :run-program (format nil " curl -fsSL ~A -o ~A " url file)
21- :output ' (:string :stripped t )
22- :error-output :output ))
23- (file (and file (probe-file file)))
24- (release (url-to-release url)))
20+ ; ; Convert the file path to a string with any leading "~" replaced by the
21+ ; ; HOME directory, and then download.
22+ (let* ((file-namestring (namestring file))
23+ (file-namestring-full (if (uiop :string-prefix-p " ~" file-namestring )
24+ (concatenate ' string
25+ (namestring (user-homedir-pathname ))
26+ (subseq file-namestring 1 ))
27+ file-namestring ))
28+ (output (uiop :run-program (list " curl" " -fsSL" url " -o" file-namestring-full)
29+ :force-shell nil
30+ :output ' (:string :stripped t )
31+ :error-output :output ))
32+ (file (and file (probe-file file)))
33+ (release (url-to-release url)))
2534 (when release
2635 (verify-download file release))
2736 (values output file))
You can’t perform that action at this time.
0 commit comments