Add SCP install fallback for remote servers without curl/wget#10215
Add SCP install fallback for remote servers without curl/wget#10215alokedesai wants to merge 1 commit intomasterfrom
Conversation
|
I'm starting a first review of this pull request. You can view the conversation on Warp. I completed the review and no human review was requested for this pull request. Comment Powered by Oz |
There was a problem hiding this comment.
Overview
This PR adds curl/wget detection plus an SCP upload fallback for remote server installs on hosts without HTTP clients.
Concerns
- The SCP extraction path is passed as a quoted
$HOME/~value and then moved literally, so the new no-curl/no-wget fallback can fail after uploading the tarball. - The local fallback download is not covered by a timeout, which can leave setup stuck if local
curlstalls.
Verdict
Found: 0 critical, 2 important, 0 suggestions
Request changes
Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).
Powered by Oz
| # SCP fallback: tarball already uploaded by the client. | ||
| mv "$1" "$tmpdir/oz.tar.gz" |
There was a problem hiding this comment.
$HOME/... or ~/..., but quoted positional parameters are not expanded by mv "$1", so the SCP path can fail after upload. Expand the argument before moving it.
| # SCP fallback: tarball already uploaded by the client. | |
| mv "$1" "$tmpdir/oz.tar.gz" | |
| # SCP fallback: tarball already uploaded by the client. | |
| tarball_src="$1" | |
| tarball_src="${tarball_src/#\$HOME/$HOME}" | |
| tarball_src="${tarball_src/#\~/$HOME}" | |
| mv "$tarball_src" "$tmpdir/oz.tar.gz" |
| .stderr(Stdio::piped()) | ||
| .kill_on_drop(true) | ||
| .output() | ||
| .await |
There was a problem hiding this comment.
curl has no timeout, so a stalled CDN connection can keep the install future pending indefinitely even though SCP_INSTALL_TIMEOUT covers the later steps. Wrap the download in a timeout or pass curl timeout flags and return an install error.
This change implements an SCP install fallback for the remote server setup. This allows the installation to succeed even if the remote server doesn't have
curlorwgetinstalled.curlandwgetand falls back to an error if neither is available.shell-wordsas a dependency.