Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions crates/codex-mac-engine/src/download.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,10 @@ pub fn download_to_with_progress(
let mut child = Command::new("curl")
.args([
"-fL",
"--proto",
"=https",
"--proto-redir",
"=https",
"--no-progress-meter",
"-C",
"-",
Expand Down
15 changes: 14 additions & 1 deletion crates/codex-mac-engine/src/sys.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,16 @@ use crate::EngineError;
/// Fetch a small text resource (the appcast) over HTTPS via system `curl`.
pub fn fetch_text(url: &str) -> Result<String, EngineError> {
let output = Command::new("curl")
.args(["-fsSL", "--connect-timeout", "20", url])
.args([
"-fsSL",
"--proto",
"=https",
"--proto-redir",
"=https",
"--connect-timeout",
"20",
url,
])
.output()
.map_err(|e| EngineError::Io(format!("spawn curl: {e}")))?;

Expand All @@ -35,6 +44,10 @@ pub fn fetch_text_timeout(url: &str, max_secs: u64) -> Result<String, EngineErro
let output = Command::new("curl")
.args([
"-fsSL",
"--proto",
"=https",
"--proto-redir",
"=https",
"--connect-timeout",
"5",
"--max-time",
Expand Down
4 changes: 4 additions & 0 deletions crates/codex-win-engine/src/download.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,10 @@ fn run_curl(url: &str, dest: &Path, resume: bool, on_progress: &dyn Fn(u64)) ->
let dest = dest.to_string_lossy().into_owned();
let mut args = vec![
"-fL".to_string(),
"--proto".to_string(),
"=https".to_string(),
"--proto-redir".to_string(),
"=https".to_string(),
"--no-progress-meter".to_string(),
"--connect-timeout".to_string(),
"20".to_string(),
Expand Down
11 changes: 10 additions & 1 deletion crates/codex-win-engine/src/sys.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,16 @@ impl MsixDependencyPrecheck {

pub fn fetch_text(url: &str) -> Result<String, EngineError> {
let output = hidden_command("curl")
.args(["-fsSL", "--connect-timeout", "20", url])
.args([
"-fsSL",
"--proto",
"=https",
"--proto-redir",
"=https",
"--connect-timeout",
"20",
url,
])
.output()
.map_err(|e| EngineError::Io(format!("spawn curl: {e}")))?;

Expand Down
Loading