Skip to content

Commit 50362ec

Browse files
committed
added 60 second timeout for git commands in refresher
1 parent 69e2b04 commit 50362ec

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tmc-langs-util/src/task_executor/course_refresher.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ use crate::{
88
use md5::Context;
99
use serde::{Deserialize, Serialize};
1010
use serde_yaml::Mapping;
11-
use std::io::Write;
1211
use std::path::{Path, PathBuf};
12+
use std::{io::Write, time::Duration};
1313
use tmc_langs_framework::{command::TmcCommand, file_util, subprocess::Redirection};
1414
use walkdir::WalkDir;
1515

@@ -214,7 +214,7 @@ fn initialize_new_cache_clone(
214214
.stdout(Redirection::Pipe)
215215
.stderr(Redirection::Pipe)
216216
})
217-
.output_checked()
217+
.output_with_timeout_checked(Duration::from_secs(60))
218218
};
219219

220220
run_git(&["remote", "set-url", "origin", course_source_url])?;

0 commit comments

Comments
 (0)