diff --git a/pkg/installpackage/link.go b/pkg/installpackage/link.go index 15032c4a2..435b44650 100644 --- a/pkg/installpackage/link.go +++ b/pkg/installpackage/link.go @@ -4,6 +4,7 @@ import ( "fmt" "os" "path/filepath" + "runtime" "strings" "github.com/aquaproj/aqua/v2/pkg/config" @@ -29,7 +30,7 @@ func (is *Installer) createLinks(logE *logrus.Entry, pkgs []*config.Package) boo for _, pkg := range pkgs { pkgInfo := pkg.PackageInfo for _, file := range pkgInfo.GetFiles() { - if isWindows(is.runtime.GOOS) { + if isWindows(runtime.GOOS) { hardLink := filepath.Join(is.rootDir, "bin", file.Name+".exe") if f, err := afero.Exists(is.fs, hardLink); err != nil { logerr.WithError(logE, err).WithFields(logrus.Fields{ diff --git a/pkg/installpackage/proxy.go b/pkg/installpackage/proxy.go index e439de4b4..76cdaacdf 100644 --- a/pkg/installpackage/proxy.go +++ b/pkg/installpackage/proxy.go @@ -4,6 +4,7 @@ import ( "context" "fmt" "path/filepath" + "runtime" "github.com/aquaproj/aqua/v2/pkg/checksum" "github.com/aquaproj/aqua/v2/pkg/config" @@ -87,7 +88,7 @@ func (is *Installer) InstallProxy(ctx context.Context, logE *logrus.Entry) error }); err != nil { return err } - if isWindows(is.runtime.GOOS) { + if isWindows(runtime.GOOS) { return is.recreateHardLinks() } } else { //nolint:gocritic @@ -96,7 +97,7 @@ func (is *Installer) InstallProxy(ctx context.Context, logE *logrus.Entry) error } } - if isWindows(is.runtime.GOOS) { + if isWindows(runtime.GOOS) { return nil }