Skip to content

Commit

Permalink
fix(pro): reinitialize devcontainer folder if running on runner with …
Browse files Browse the repository at this point in the history
…local agent
  • Loading branch information
pascalbreuninger committed Dec 19, 2024
1 parent 6a1c487 commit 4d57616
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions cmd/ssh.go
Original file line number Diff line number Diff line change
Expand Up @@ -677,6 +677,11 @@ func (cmd *SSHCmd) jumpLocalProxyContainer(ctx context.Context, devPodConfig *co
return nil
}

_, err = workspace.InitContentFolder(workspaceInfo, log)
if err != nil {
return err
}

runner, err := workspace.CreateRunner(workspaceInfo, log)
if err != nil {
return err
Expand All @@ -689,9 +694,7 @@ func (cmd *SSHCmd) jumpLocalProxyContainer(ctx context.Context, devPodConfig *co

if containerDetails == nil || containerDetails.State.Status != "running" {
log.Info("Workspace isn't running, starting up...")
_, err := runner.Up(ctx, devcontainer.UpOptions{
CLIOptions: workspaceInfo.CLIOptions,
NoBuild: true}, workspaceInfo.InjectTimeout)
_, err := runner.Up(ctx, devcontainer.UpOptions{NoBuild: true}, workspaceInfo.InjectTimeout)
if err != nil {
return err
}
Expand Down

0 comments on commit 4d57616

Please sign in to comment.