🥇 export from upstream (c220697)
This commit is contained in:
+7
-2
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user