mirror of
https://github.com/starship/starship.git
synced 2024-10-05 01:43:46 +02:00
fix: deprioritize OCI detection
This commit is contained in:
parent
2504cc4906
commit
d6f6965e80
@ -21,19 +21,6 @@ pub fn module<'a>(context: &'a Context) -> Option<Module<'a>> {
|
||||
return Some("OpenVZ".into());
|
||||
}
|
||||
|
||||
if context_path(context, "/run/host/container-manager").exists() {
|
||||
// systemd-nspawn
|
||||
if read_file("/run/host/container-manager")
|
||||
.map(|c| c.contains("systemd-nspawn"))
|
||||
.unwrap_or_default()
|
||||
{
|
||||
return Some("nspawn".into());
|
||||
}
|
||||
|
||||
// OCI
|
||||
return Some("OCI".into());
|
||||
}
|
||||
|
||||
let container_env_path = context_path(context, "/run/.containerenv");
|
||||
|
||||
if container_env_path.exists() {
|
||||
@ -77,6 +64,11 @@ pub fn module<'a>(context: &'a Context) -> Option<Module<'a>> {
|
||||
return Some("Docker".into());
|
||||
}
|
||||
|
||||
if context_path(context, "/run/host/container-manager").exists() {
|
||||
// OCI
|
||||
return Some("OCI".into());
|
||||
}
|
||||
|
||||
None
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user