From 7c45d93e5e0bb7c4cff12dad8ed505086a0967cc Mon Sep 17 00:00:00 2001 From: KyleBarton Date: Thu, 16 Apr 2026 09:00:41 -0700 Subject: [PATCH] Use remote_user to execute on_create_command and update_content_command (#54020) Self-Review Checklist: - [x] I've reviewed my own diff for quality, security, and reliability - [x] Unsafe blocks (if any) have justifying comments - [x] The content is consistent with the [UI/UX checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist) - [x] Tests cover the new/changed behavior - [x] Performance impact has been considered and is acceptable Closes #53995 Release Notes: - Improved dev container remote script execution to more closely align with the reference implementation --- crates/dev_container/src/devcontainer_manifest.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/crates/dev_container/src/devcontainer_manifest.rs b/crates/dev_container/src/devcontainer_manifest.rs index 9927a639542619464f559a5853071433b20b4823..04815f5406f695be39ac919b35fcf430a2fbd623 100644 --- a/crates/dev_container/src/devcontainer_manifest.rs +++ b/crates/dev_container/src/devcontainer_manifest.rs @@ -1875,7 +1875,7 @@ RUN sed -i -E 's/((^|\s)PATH=)([^\$]*)$/\1\${PATH:-\3}/g' /etc/profile || true .run_docker_exec( &devcontainer_up.container_id, &remote_folder, - "root", + &devcontainer_up.remote_user, &devcontainer_up.remote_env, command, ) @@ -1889,7 +1889,7 @@ RUN sed -i -E 's/((^|\s)PATH=)([^\$]*)$/\1\${PATH:-\3}/g' /etc/profile || true .run_docker_exec( &devcontainer_up.container_id, &remote_folder, - "root", + &devcontainer_up.remote_user, &devcontainer_up.remote_env, command, ) @@ -2371,8 +2371,6 @@ fn image_from_dockerfile(dockerfile_contents: String, target: &Option) - }) } -// Container user things -// This should come from spec - see the docs fn get_remote_user_from_config( docker_config: &DockerInspect, devcontainer: &DevContainerManifest,