Skip to content

Commit

Permalink
removed additional line prints
Browse files Browse the repository at this point in the history
  • Loading branch information
Warren Veerasingam authored and Warren Veerasingam committed Oct 24, 2018
1 parent 77f8aa3 commit c2b4856
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 12 deletions.
12 changes: 1 addition & 11 deletions lib/install.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import (
"os/user"
"regexp"
"runtime"
"strings"
)

const (
Expand Down Expand Up @@ -45,12 +44,9 @@ func init() {
/* overrride installation default binary path if terraform is already installed */
/* find the last bin path */
for path := next(); len(path) > 0; path = next() {
fmt.Printf("Found installation path: %v \n", path)
installedBinPath = path
}

fmt.Printf("Terraform binary path: %v \n", installedBinPath)

/* Create local installation directory if it does not exist */
CreateDirIfNotExist(installLocation)

Expand All @@ -72,7 +68,6 @@ func Install(tfversion string) {
symlinkExist := CheckSymlink(installedBinPath)

if symlinkExist {
fmt.Println("Reset symlink")
RemoveSymlink(installedBinPath)
}

Expand All @@ -87,18 +82,14 @@ func Install(tfversion string) {
url := hashiURL + tfversion + "/" + installVersion + tfversion + "_" + goos + "_" + goarch + ".zip"
zipFile, _ := DownloadFromURL(installLocation, url)

fmt.Printf("Downloaded zipFile: %v \n", zipFile)

/* unzip the downloaded zipfile */
files, errUnzip := Unzip(zipFile, installLocation)
_, errUnzip := Unzip(zipFile, installLocation)
if errUnzip != nil {
fmt.Println("Unable to unzip downloaded zip file")
log.Fatal(errUnzip)
os.Exit(1)
}

fmt.Println("Unzipped: " + strings.Join(files, "\n"))

/* rename unzipped file to terraform version name - terraform_x.x.x */
RenameFile(installLocation+installFile, installLocation+installVersion+tfversion)

Expand All @@ -109,7 +100,6 @@ func Install(tfversion string) {
symlinkExist := CheckSymlink(installedBinPath)

if symlinkExist {
fmt.Println("Reset symlink")
RemoveSymlink(installedBinPath)
}

Expand Down
1 change: 0 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ func main() {
os.Exit(1)
}

fmt.Printf("Terraform version %q selected\n", tfversion)
lib.AddRecent(tfversion) //add to recent file for faster lookup
lib.Install(tfversion)

Expand Down

0 comments on commit c2b4856

Please sign in to comment.