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 8abee04 commit 75fa2e0Copy full SHA for 75fa2e0
crates/ostree-ext/src/globals.rs
@@ -81,8 +81,17 @@ impl ConfigPaths {
81
82
/// Return the path to the global container authentication file, if it exists.
83
pub fn get_global_authfile(root: &Dir) -> Result<Option<(Utf8PathBuf, File)>> {
84
- let root = &RootDir::new(root, ".")?;
+ // Workaround for https://github.com/rpm-software-management/mock/pull/1613#issuecomment-3421908652
85
+ #[cfg(test)]
86
+ if matches!(
87
+ std::env::var("container").ok().as_deref(),
88
+ Some("systemd-nspawn")
89
+ ) {
90
+ return Ok(None);
91
+ }
92
+
93
let am_uid0 = rustix::process::getuid() == rustix::process::Uid::ROOT;
94
+ let root = &RootDir::new(root, ".")?;
95
get_global_authfile_impl(root, am_uid0)
96
}
97
0 commit comments