Skip to content

Commit

Permalink
Correctly populate container environment rootless status
Browse files Browse the repository at this point in the history
Previously this was just always None via Default.

Also updated trace logging to show the entire container_info struct.
All of those fields are potentially useful, not just engine.

Signed-off-by: John Eckersberg <[email protected]>
  • Loading branch information
jeckersb committed Mar 21, 2024
1 parent 532815a commit cf11ed2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/src/containerenv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ pub(crate) fn get_container_execution_info(rootfs: &Dir) -> Result<ContainerExec
"id" => r.id = v.to_string(),
"image" => r.image = v.to_string(),
"imageid" => r.imageid = v.to_string(),
"rootless" => r.rootless = Some(v.to_string()),
_ => {}
}
}
Expand Down
2 changes: 1 addition & 1 deletion lib/src/install.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1003,7 +1003,7 @@ async fn prepare_install(
"Cannot install from rootless podman; this command must be run as root"
);
}
tracing::trace!("Read container engine info {:?}", container_info.engine);
tracing::trace!("Read container engine info {:?}", container_info);

SourceInfo::from_container(&container_info)?
}
Expand Down

0 comments on commit cf11ed2

Please sign in to comment.