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 a0f2e84 commit b58c3f4
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 @@ -662,6 +662,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 @@ -674,9 +679,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 b58c3f4

Please sign in to comment.