diff --git a/internal/cmd/dev/cmd_file_sync.go b/internal/cmd/dev/cmd_file_sync.go index 3e6b6b2..3f24df1 100644 --- a/internal/cmd/dev/cmd_file_sync.go +++ b/internal/cmd/dev/cmd_file_sync.go @@ -195,12 +195,12 @@ func runFileSync(source string) error { // resolveTargetRepos resolves the --to pattern to actual repos func resolveTargetRepos(pattern string) ([]*repos.Repo, error) { // Load registry - registryPath, err := repos.FindRegistry(io.Local) + registryPath, err := repos.FindRegistry(coreio.Local) if err != nil { return nil, log.E("dev.sync", "failed to find registry", err) } - registry, err := repos.LoadRegistry(io.Local, registryPath) + registry, err := repos.LoadRegistry(coreio.Local, registryPath) if err != nil { return nil, log.E("dev.sync", "failed to load registry", err) } diff --git a/internal/cmd/pkgcmd/cmd_install.go b/internal/cmd/pkgcmd/cmd_install.go index 4974071..6e85f50 100644 --- a/internal/cmd/pkgcmd/cmd_install.go +++ b/internal/cmd/pkgcmd/cmd_install.go @@ -51,8 +51,8 @@ func runPkgInstall(repoArg, targetDir string, addToRegistry bool) error { // Determine target directory if targetDir == "" { - if regPath, err := repos.FindRegistry(io.Local); err == nil { - if reg, err := repos.LoadRegistry(io.Local, regPath); err == nil { + if regPath, err := repos.FindRegistry(coreio.Local); err == nil { + if reg, err := repos.LoadRegistry(coreio.Local, regPath); err == nil { targetDir = reg.BasePath if targetDir == "" { targetDir = "./packages" @@ -110,12 +110,12 @@ func runPkgInstall(repoArg, targetDir string, addToRegistry bool) error { } func addToRegistryFile(org, repoName string) error { - regPath, err := repos.FindRegistry(io.Local) + regPath, err := repos.FindRegistry(coreio.Local) if err != nil { return errors.New(i18n.T("cmd.pkg.error.no_repos_yaml")) } - reg, err := repos.LoadRegistry(io.Local, regPath) + reg, err := repos.LoadRegistry(coreio.Local, regPath) if err != nil { return err } diff --git a/internal/cmd/pkgcmd/cmd_search.go b/internal/cmd/pkgcmd/cmd_search.go index c99b66e..778ce35 100644 --- a/internal/cmd/pkgcmd/cmd_search.go +++ b/internal/cmd/pkgcmd/cmd_search.go @@ -13,6 +13,7 @@ import ( "github.com/host-uk/core/pkg/cache" "github.com/host-uk/core/pkg/i18n" + coreio "github.com/host-uk/core/pkg/io" "github.com/host-uk/core/pkg/repos" "github.com/spf13/cobra" ) @@ -69,7 +70,7 @@ type ghRepo struct { func runPkgSearch(org, pattern, repoType string, limit int, refresh bool) error { // Initialize cache in workspace .core/ directory var cacheDir string - if regPath, err := repos.FindRegistry(io.Local); err == nil { + if regPath, err := repos.FindRegistry(coreio.Local); err == nil { cacheDir = filepath.Join(filepath.Dir(regPath), ".core", "cache") }