Skip to content

Commit 70f1fb7

Browse files
committed
fixup! Introduce install descriptor
1 parent 3880bd8 commit 70f1fb7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

internal/pkg/agent/application/upgrade/upgrade.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ type unpackHandler interface {
8989
// Types used to abstract copyActionStore, copyRunDirectory and github.com/otiai10/copy.Copy
9090
type copyActionStoreFunc func(log *logger.Logger, newHome string) error
9191
type copyRunDirectoryFunc func(log *logger.Logger, oldRunPath, newRunPath string) error
92-
type fileDirCopyFunc func(from, to string, opts ...copy.Options) error
92+
type fileDirCopyFunc func(from, to string, opts ...filecopy.Options) error
9393

9494
// Types used to abstract stdlib functions
9595
type mkdirAllFunc func(name string, perm fs.FileMode) error
@@ -155,7 +155,7 @@ func NewUpgrader(log *logger.Logger, settings *artifact.Config, upgradeConfig *c
155155
isDiskSpaceErrorFunc: upgradeErrors.IsDiskSpaceError,
156156
extractAgentVersion: extractAgentVersion,
157157
copyActionStore: copyActionStoreProvider(os.ReadFile, os.WriteFile),
158-
copyRunDirectory: copyRunDirectoryProvider(os.MkdirAll, copy.Copy),
158+
copyRunDirectory: copyRunDirectoryProvider(os.MkdirAll, filecopy.Copy),
159159
}, nil
160160
}
161161

@@ -805,7 +805,7 @@ func shutdownCallback(l *logger.Logger, homePath, prevVersion, newVersion, newHo
805805
newRelPath = strings.ReplaceAll(newRelPath, oldHome, newHome)
806806
newDir := filepath.Join(newHome, newRelPath)
807807
l.Debugf("copying %q -> %q", processDir, newDir)
808-
if err := copyDir(l, processDir, newDir, true, copy.Copy); err != nil {
808+
if err := copyDir(l, processDir, newDir, true, filecopy.Copy); err != nil {
809809
return err
810810
}
811811
}

0 commit comments

Comments
 (0)