mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user