@@ -74,7 +74,7 @@ func (cmd *DeleteCmd) Run(ctx context.Context, args []string) error {
7474 // stop daemon and clean up local workspaces
7575 if providerConfig .IsDaemonProvider () {
7676 // clean up local workspaces
77- workspaces , err := workspace .List ( ctx , devPodConfig , true , cmd . Owner , log .Default )
77+ workspaces , err := workspace .ListLocalWorkspaces ( devPodConfig . DefaultContext , false , log .Default )
7878 if err != nil {
7979 log .Default .Warnf ("Failed to list workspaces: %v" , err )
8080 } else {
@@ -130,22 +130,22 @@ func cleanupLocalWorkspaces(ctx context.Context, devPodConfig *config.Config, wo
130130 wg .Add (1 )
131131 go func (w provider.Workspace ) {
132132 defer wg .Done ()
133- client , err := workspace .Get (ctx , devPodConfig , []string {w .ID }, true , owner , false , log )
133+ client , err := workspace .Get (ctx , devPodConfig , []string {w .ID }, true , owner , true , log )
134134 if err != nil {
135135 log .Errorf ("Failed to get workspace %s: %v" , w .ID , err )
136136 return
137137 }
138138 // delete workspace folder
139139 err = clientimplementation .DeleteWorkspaceFolder (devPodConfig .DefaultContext , client .Workspace (), client .WorkspaceConfig ().SSHConfigPath , log )
140140 if err != nil {
141- log .Errorf ("Failed to delete workspace %s: %v" , w .ID , err )
141+ log .Errorf ("Failed to remove workspace %s: %v" , w .ID , err )
142142 return
143143 }
144- log .Donef ("Successfully deleted workspace %s" , w .ID )
144+ log .Donef ("Successfully removed workspace %s" , w .ID )
145145 }(* w )
146146 }
147147
148- log .Infof ("Waiting for %d workspaces to be deleted " , len (usedWorkspaces ))
148+ log .Infof ("Waiting for %d workspace(s) to be removed locally " , len (usedWorkspaces ))
149149 wg .Wait ()
150150 }
151151}
0 commit comments