diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/project.rs | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/src/project.rs b/src/project.rs index f643704..0dac2ef 100644 --- a/src/project.rs +++ b/src/project.rs @@ -170,10 +170,19 @@ impl Project { command.env("PATH", env::join_paths(paths)?); } if name == "podman" { - command.env( - "CONTAINERS_CONF_OVERRIDE", - self.root.join("infra/podman.conf"), - ); + let version = process::text(Command::new("podman").arg("--version"))?; + let major = version + .split_whitespace() + .nth(2) + .and_then(|value| value.split('.').next()) + .context("Cannot determine the Podman version")? + .parse::<u32>()?; + if major < 6 { + command.env( + "CONTAINERS_CONF_OVERRIDE", + self.root.join("infra/podman.conf"), + ); + } command .arg("--root") .arg(self.root.join("var/podman/storage")) |
