File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ use cap_std_ext::cap_std::fs::Dir;
7
7
use cap_std_ext:: prelude:: CapStdExtDirExt ;
8
8
use fn_error_context:: context;
9
9
10
+ /// Path is relative to container rootfs (assumed to be /)
10
11
const PATH : & str = "run/.containerenv" ;
11
12
12
13
#[ derive( Debug , Default ) ]
@@ -25,7 +26,9 @@ pub(crate) fn get_container_execution_info(rootfs: &Dir) -> Result<ContainerExec
25
26
let f = match rootfs. open_optional ( PATH ) ? {
26
27
Some ( f) => BufReader :: new ( f) ,
27
28
None => {
28
- anyhow:: bail!( "This command must be executed inside a podman container (missing {PATH}" )
29
+ anyhow:: bail!(
30
+ "This command must be executed inside a podman container (missing /{PATH})"
31
+ )
29
32
}
30
33
} ;
31
34
let mut r = ContainerExecutionInfo :: default ( ) ;
You can’t perform that action at this time.
0 commit comments