From 0ff91e7406db6ee22790437ee2981ef5e1a12d5e Mon Sep 17 00:00:00 2001 From: Tristan Isham Date: Thu, 28 Mar 2024 02:35:19 -0400 Subject: [PATCH] fixed broken use command --- cli/use.go | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/cli/use.go b/cli/use.go index bb98518..966c25f 100644 --- a/cli/use.go +++ b/cli/use.go @@ -12,7 +12,7 @@ import ( "path/filepath" "strings" - "github.com/charmbracelet/log" + // "github.com/charmbracelet/log" "github.com/tristanisham/zvm/cli/meta" ) @@ -30,17 +30,14 @@ func (z *ZVM) Use(ver string) error { } } } - + return z.setBin(ver) } func (z *ZVM) setBin(ver string) error { + // .zvm/master version_path := filepath.Join(z.baseDir, ver) if err := os.Remove(filepath.Join(z.baseDir, "bin")); err != nil { - log.Warn(err) - } - - if err := meta.Symlink(filepath.Join(z.baseDir, ver), filepath.Join(z.baseDir, "bin")); err != nil { return err } @@ -48,6 +45,7 @@ func (z *ZVM) setBin(ver string) error { return err } + return nil }