🥇 export from upstream (c220697)

This commit is contained in:
sandcage-export
2026-05-22 02:04:36 +02:00
parent f2f7206d06
commit bef6fc30c5
2 changed files with 10 additions and 5 deletions
+7 -2
View File
@@ -122,8 +122,13 @@ pub fn build_compose_env(workspace: &Path) -> Result<HashMap<String, String>> {
let home = dirs::home_dir().ok_or(DockerError::NoHomeDir)?;
let sandcage_home = home.join(".sandcage");
let uid = id_flag("-u")?;
let gid = id_flag("-g")?;
// On Windows, UID/GID passthrough is meaningless — use the container's
// built-in agent user (1000:1000). On Linux, match the host user.
let (uid, gid) = if cfg!(windows) {
("1000".to_string(), "1000".to_string())
} else {
(id_flag("-u")?, id_flag("-g")?)
};
let mut env = HashMap::new();
env.insert("SANDCAGE_UID".into(), uid);