Skip to content

Commit 904a52f

Browse files
fix(cli): update workspace content for local sources in pro
1 parent d73cd70 commit 904a52f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

cmd/agent/workspace/up.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,12 @@ func (cmd *UpCmd) up(ctx context.Context, workspaceInfo *provider2.AgentWorkspac
176176
}
177177

178178
func prepareWorkspace(ctx context.Context, workspaceInfo *provider2.AgentWorkspaceInfo, client tunnel.TunnelClient, helper string, log log.Logger) error {
179+
// change content folder if source is local folder in proxy mode
180+
// to a folder that's known ahead of time inside of DEVPOD_HOME
181+
if workspaceInfo.CLIOptions.Proxy && workspaceInfo.Workspace.Source.LocalFolder != "" {
182+
workspaceInfo.ContentFolder = agent.GetAgentWorkspaceContentDir(workspaceInfo.Origin)
183+
}
184+
179185
// make sure content folder exists
180186
exists, err := InitContentFolder(workspaceInfo, log)
181187
if err != nil {

0 commit comments

Comments
 (0)