fix(agent/agentcontainers): read WorkspaceFolder from config (#18467)

Instead of exec'ing `pwd` inside of the container, we instead read
`WorkspaceFolder` from the outcome of `read-configuration`.
This commit is contained in:
Danielle Maywood
2025-06-20 16:34:30 +01:00
committed by GitHub
parent 9c1feffded
commit d61353f468
3 changed files with 20 additions and 51 deletions
+5
View File
@@ -22,6 +22,7 @@ import (
type DevcontainerConfig struct {
MergedConfiguration DevcontainerMergedConfiguration `json:"mergedConfiguration"`
Configuration DevcontainerConfiguration `json:"configuration"`
Workspace DevcontainerWorkspace `json:"workspace"`
}
type DevcontainerMergedConfiguration struct {
@@ -46,6 +47,10 @@ type CoderCustomization struct {
Name string `json:"name,omitempty"`
}
type DevcontainerWorkspace struct {
WorkspaceFolder string `json:"workspaceFolder"`
}
// DevcontainerCLI is an interface for the devcontainer CLI.
type DevcontainerCLI interface {
Up(ctx context.Context, workspaceFolder, configPath string, opts ...DevcontainerCLIUpOptions) (id string, err error)