diff --git a/src/test/mod.rs b/src/test/mod.rs index 359bbca..5bda8c0 100644 --- a/src/test/mod.rs +++ b/src/test/mod.rs @@ -176,7 +176,16 @@ pub async fn run(opts: TestOptions<'_>) -> Result, + local_context: bool, view: &dyn BuildView, ) -> Result<(), Box> { let mut sources = crate::apt::sources::load(Some(ctx.clone()))?; @@ -509,7 +519,16 @@ async fn configure_testbed( .status() .map_err(|e| format!("apt-get update failed inside the testbed: {e}"))?; if !status.success() { - return Err("apt-get update failed inside the testbed".into()); + return Err(format!( + "apt-get update failed inside the testbed{}", + if local_context { + " (a local run needs root to install packages: \ + use sudo, or the default chroot mode)" + } else { + "" + } + ) + .into()); } if opts.apt_upgrade {