Skip to content

Commit

Permalink
Merge pull request #122 from warrensbox/master
Browse files Browse the repository at this point in the history
RE: Take explicit version given to CLI as highest priority
  • Loading branch information
warrensbox committed Jan 9, 2021
2 parents 322d0f5 + 44315ba commit d7fb9d1
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,21 +103,21 @@ func main() {
}

switch {
case checkTFModuleFileExist(dir):
installTFProvidedModule(dir, &binPath)
case len(args) == 1:
installVersion(args[0], &binPath)
case *listAllFlag:
listAll := true //set list all true - all versions including beta and rc will be displayed
installOption(listAll, &binPath)
case fileExists(curr_rcfile):
case len(args) == 1:
installVersion(args[0], &binPath)
case fileExists(curr_rcfile) && len(args) == 0:
readingFileMsg(rcFilename)
tfversion := retrieveFileContents(curr_rcfile)
installVersion(tfversion, &binPath)
case fileExists(curr_tfvfile):
case fileExists(curr_tfvfile) && len(args) == 0:
readingFileMsg(tfvFilename)
tfversion := retrieveFileContents(curr_tfvfile)
installVersion(tfversion, &binPath)
case checkTFModuleFileExist(dir) && len(args) == 0:
installTFProvidedModule(dir, &binPath)
case version != "":
installVersion(version, &binPath)
default:
Expand Down

0 comments on commit d7fb9d1

Please sign in to comment.