MCPcopy Index your code
hub / github.com/devspace-sh/devspace / ExecuteBatchCommand

Method ExecuteBatchCommand

pkg/devspace/sync/upstream.go:732–751  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

730}
731
732func (u *upstream) ExecuteBatchCommand() error {
733 if u.sync.Options.UploadBatchCmd != "" {
734 u.sync.log.Infof("Upstream - Execute command '%s %s'", u.sync.Options.UploadBatchCmd, strings.Join(u.sync.Options.UploadBatchArgs, " "))
735
736 ctx, cancel := context.WithTimeout(u.sync.ctx, time.Minute*10)
737 defer cancel()
738
739 _, err := u.client.Execute(ctx, &remote.Command{
740 Cmd: u.sync.Options.UploadBatchCmd,
741 Args: u.sync.Options.UploadBatchArgs,
742 })
743 if err != nil {
744 return errors.Wrap(err, "execute command")
745 }
746
747 u.sync.log.Infof("Upstream - Done executing command")
748 }
749
750 return nil
751}
752
753func (u *upstream) updateUploadChanges(files []*FileInformation) []*FileInformation {
754 newChanges := make([]*FileInformation, 0, len(files))

Callers 1

execCommandsMethod · 0.95

Calls 3

WithTimeoutMethod · 0.80
ExecuteMethod · 0.65
InfofMethod · 0.45

Tested by

no test coverage detected