We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 83c1ce3 commit 78a3048Copy full SHA for 78a3048
src/run/runner/helpers/apt.rs
@@ -155,7 +155,9 @@ fn restore_from_cache(system_info: &SystemInfo, cache_dir: &Path) -> Result<()>
155
.to_str()
156
.ok_or_else(|| anyhow!("Invalid cache directory path"))?;
157
158
- run_with_sudo("cp", ["-r", &format!("{cache_dir_str}/*"), "/"])?;
+ // IMPORTANT: We have to use 'bash' here to ensure that glob patterns are expanded correctly
159
+ let copy_cmd = format!("cp -r {cache_dir_str}/* /");
160
+ run_with_sudo("bash", ["-c", ©_cmd])?;
161
162
debug!("Cache restored successfully");
163
Ok(())
0 commit comments