File tree 1 file changed +11
-1
lines changed
1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -511,7 +511,14 @@ func (api *API) handleDevcontainerRecreate(w http.ResponseWriter, r *http.Reques
511
511
slog .F ("name" , api .knownDevcontainers [i ].Name ),
512
512
)
513
513
api .knownDevcontainers [i ].Dirty = false
514
- api .knownDevcontainers [i ].Container = nil
514
+ // This is a bit of a hack since we don't know if we're
515
+ // referencing the new or the old container. But this issue
516
+ // will be cleared up the next time we call getContainers.
517
+ // TODO(mafredri): This should be handled by a service that
518
+ // updates the devcontainer state periodically and on-demand.
519
+ if api .knownDevcontainers [i ].Container != nil {
520
+ api .knownDevcontainers [i ].Container .DevcontainerDirty = false
521
+ }
515
522
}
516
523
return
517
524
}
@@ -584,6 +591,9 @@ func (api *API) markDevcontainerDirty(configPath string, modifiedAt time.Time) {
584
591
if api .knownDevcontainers [i ].Container != nil {
585
592
api .knownDevcontainers [i ].Container .DevcontainerDirty = true
586
593
}
594
+ // Set the modified time to the zero value to indicate that the
595
+ // containers list must be refreshed.
596
+ api .mtime = time.Time {}
587
597
}
588
598
}
589
599
})
You can’t perform that action at this time.
0 commit comments