Skip to content

Commit

Permalink
Add missing "Syncing files into the container" spinner when running '…
Browse files Browse the repository at this point in the history
…odo dev' on Podman

This indicates to the user that we are sync'ing the files,
which might be a potentially long operation.
This is to be consistent with the output when using 'odo dev' on cluster.
  • Loading branch information
rm3l committed Jun 1, 2023
1 parent 368ca2b commit cbcac67
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/dev/podmandev/podmandev.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import (
"github.com/redhat-developer/odo/pkg/devfile/location"
"github.com/redhat-developer/odo/pkg/exec"
"github.com/redhat-developer/odo/pkg/libdevfile"
"github.com/redhat-developer/odo/pkg/log"
odocontext "github.com/redhat-developer/odo/pkg/odo/context"
"github.com/redhat-developer/odo/pkg/podman"
"github.com/redhat-developer/odo/pkg/portForward"
Expand Down Expand Up @@ -114,6 +115,8 @@ func (o *DevClient) syncFiles(ctx context.Context, options dev.StartOptions, pod
PodName: pod.GetName(),
SyncFolder: syncFolder,
}
s := log.Spinner("Syncing files into the container")
defer s.End(false)

cmdKind := devfilev1.RunCommandGroupKind
cmdName := options.RunCommand
Expand Down Expand Up @@ -141,6 +144,7 @@ func (o *DevClient) syncFiles(ctx context.Context, options dev.StartOptions, pod
if err != nil {
return false, err
}
s.End(true)
return execRequired, nil
}

Expand Down

0 comments on commit cbcac67

Please sign in to comment.