Skip to content

Commit

Permalink
Merge pull request #13 from dguglielmi/fix-custom-path-switch
Browse files Browse the repository at this point in the history
Fix custom path usage when switching to already downloaded versions
  • Loading branch information
Alvin Wong authored Jul 6, 2021
2 parents 52a725e + f036cf8 commit 11949bb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,13 +90,13 @@ func main() {
if fileInstalled {

/* remove current symlink if exist*/
symlinkExist := lib.CheckSymlink(defaultBin)
symlinkExist := lib.CheckSymlink(*custBinPath)

if symlinkExist {
lib.RemoveSymlink(defaultBin)
lib.RemoveSymlink(*custBinPath)
}
/* set symlink to desired version */
lib.CreateSymlink(installLocation+installVersion+requestedVersion, defaultBin)
lib.CreateSymlink(installLocation+installVersion+requestedVersion, *custBinPath)
fmt.Printf("Switched helm to version %q \n", requestedVersion)
} else {
//check if version exist before downloading it
Expand Down

0 comments on commit 11949bb

Please sign in to comment.