Skip to content

Commit

Permalink
Merge pull request #9 from tfversion/change-to-cyan
Browse files Browse the repository at this point in the history
chore: change blue to cyan
  • Loading branch information
bschaatsbergen committed Feb 28, 2024
2 parents 4e0988f + c8a9d18 commit fb2477b
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 16 deletions.
6 changes: 3 additions & 3 deletions cmd/install.go
Expand Up @@ -45,7 +45,7 @@ var (
if latest {
if len(args) != 0 {
fmt.Println("error: `--latest` flag does not require specifying a Terraform version")
fmt.Printf("See %s for help and examples\n", color.BlueString("`tfversion install -h`"))
fmt.Printf("See %s for help and examples\n", color.CyanString("`tfversion install -h`"))
os.Exit(1)
}
install.InstallLatestVersion(preRelease)
Expand All @@ -56,7 +56,7 @@ var (
if required {
if len(args) != 0 {
fmt.Println("error: `--required` flag does not require specifying a Terraform version")
fmt.Printf("See %s for help and examples\n", color.BlueString("`tfversion install -h`"))
fmt.Printf("See %s for help and examples\n", color.CyanString("`tfversion install -h`"))
os.Exit(1)
}
install.InstallRequiredVersion()
Expand All @@ -66,7 +66,7 @@ var (
// install specific version
if len(args) != 1 {
fmt.Println("error: provide a Terraform version to install")
fmt.Printf("See %s for help and examples\n", color.BlueString("`tfversion install -h`"))
fmt.Printf("See %s for help and examples\n", color.CyanString("`tfversion install -h`"))
os.Exit(1)
}
install.InstallVersion(args[0])
Expand Down
4 changes: 2 additions & 2 deletions cmd/list.go
Expand Up @@ -37,7 +37,7 @@ var (
if helpers.IsPreReleaseVersion(version) {
fmt.Println(color.YellowString(version))
} else {
fmt.Println(color.BlueString(version))
fmt.Println(color.CyanString(version))
}
}
} else {
Expand All @@ -47,7 +47,7 @@ var (
if helpers.IsPreReleaseVersion(version) {
fmt.Println(color.YellowString(version))
} else {
fmt.Println(color.BlueString(version))
fmt.Println(color.CyanString(version))
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/uninstall.go
Expand Up @@ -26,7 +26,7 @@ var (
Run: func(cmd *cobra.Command, args []string) {
if len(args) != 1 {
fmt.Println("error: provide a Terraform version to uninstall")
fmt.Printf("See %s for help and examples\n", color.BlueString("`tfversion install -h`"))
fmt.Printf("See %s for help and examples\n", color.CyanString("`tfversion install -h`"))
os.Exit(1)
}
uninstall.Uninstall(args[0])
Expand Down
6 changes: 3 additions & 3 deletions cmd/use.go
Expand Up @@ -42,7 +42,7 @@ var (
if latest {
if len(args) != 0 {
fmt.Println("error: `--latest` flag does not require specifying a Terraform version")
fmt.Printf("See %s for help and examples\n", color.BlueString("`tfversion install -h`"))
fmt.Printf("See %s for help and examples\n", color.CyanString("`tfversion install -h`"))
os.Exit(1)
}
use.UseLatestVersion(preRelease)
Expand All @@ -53,7 +53,7 @@ var (
if required {
if len(args) != 0 {
fmt.Println("error: `--required` flag does not require specifying a Terraform version")
fmt.Printf("See %s for help and examples\n", color.BlueString("`tfversion install -h`"))
fmt.Printf("See %s for help and examples\n", color.CyanString("`tfversion install -h`"))
os.Exit(1)
}
use.UseRequiredVersion()
Expand All @@ -63,7 +63,7 @@ var (
// use specific version
if len(args) != 1 {
fmt.Println("error: provide a Terraform version to activate")
fmt.Printf("See %s for help and examples\n", color.BlueString("`tfversion install -h`"))
fmt.Printf("See %s for help and examples\n", color.CyanString("`tfversion install -h`"))
os.Exit(1)
}
use.UseVersion(args[0])
Expand Down
2 changes: 1 addition & 1 deletion pkg/download/download.go
Expand Up @@ -59,7 +59,7 @@ func Download(version, goos, goarch string) (string, error) {
if helpers.IsPreReleaseVersion(version) {
fmt.Printf("Terraform version %s downloaded successfully\n", color.YellowString(version))
} else {
fmt.Printf("Terraform version %s downloaded successfully\n", color.BlueString(version))
fmt.Printf("Terraform version %s downloaded successfully\n", color.CyanString(version))
}
// Return the path to the downloaded file.
return fmt.Sprintf("%s/terraform_%s_%s_%s.zip", downloadLocation, version, goos, goarch), nil
Expand Down
2 changes: 1 addition & 1 deletion pkg/install/install.go
Expand Up @@ -17,7 +17,7 @@ func InstallVersion(version string) {
if helpers.IsPreReleaseVersion(version) {
fmt.Printf("Terraform version %s is already installed\n", color.YellowString(version))
} else {
fmt.Printf("Terraform version %s is already installed\n", color.BlueString(version))
fmt.Printf("Terraform version %s is already installed\n", color.CyanString(version))
}
os.Exit(0)
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/uninstall/uninstall.go
Expand Up @@ -23,7 +23,7 @@ func Uninstall(version string) {
if helpers.IsPreReleaseVersion(version) {
fmt.Printf("Terraform version %s is not installed\n", color.YellowString(version))
} else {
fmt.Printf("Terraform version %s is not installed\n", color.BlueString(version))
fmt.Printf("Terraform version %s is not installed\n", color.CyanString(version))
}
os.Exit(1)
}
Expand Down
8 changes: 4 additions & 4 deletions pkg/use/use.go
Expand Up @@ -16,9 +16,9 @@ import (
func UseVersion(version string) {
if !download.IsAlreadyDownloaded(version) {
if helpers.IsPreReleaseVersion(version) {
fmt.Printf("Terraform version %s not found, run %s to install\n", color.YellowString(version), color.BlueString(fmt.Sprintf("`tfversion install %s`", version)))
fmt.Printf("Terraform version %s not found, run %s to install\n", color.YellowString(version), color.CyanString(fmt.Sprintf("`tfversion install %s`", version)))
} else {
fmt.Printf("Terraform version %s not found, run %s to install\n", color.BlueString(version), color.BlueString(fmt.Sprintf("`tfversion install %s`", version)))
fmt.Printf("Terraform version %s not found, run %s to install\n", color.CyanString(version), color.CyanString(fmt.Sprintf("`tfversion install %s`", version)))
}
os.Exit(0)
}
Expand All @@ -38,7 +38,7 @@ func UseVersion(version string) {
path := os.Getenv("PATH")
if !strings.Contains(path, targetPath) {
fmt.Println("Error: tfversion not found in your shell PATH.")
fmt.Printf("Please run %s to make this version available in your shell\n", color.BlueString("`export PATH=%s:$PATH`", targetPath))
fmt.Printf("Please run %s to make this version available in your shell\n", color.CyanString("`export PATH=%s:$PATH`", targetPath))
fmt.Println("Additionally, consider adding this line to your shell profile (e.g., .bashrc, .zshrc or fish config) for persistence.")
os.Exit(1)
}
Expand All @@ -65,7 +65,7 @@ func UseVersion(version string) {
if helpers.IsPreReleaseVersion(version) {
fmt.Printf("Activated Terraform version %s\n", color.YellowString(version))
} else {
fmt.Printf("Activated Terraform version %s\n", color.BlueString(version))
fmt.Printf("Activated Terraform version %s\n", color.CyanString(version))
}
}

Expand Down

0 comments on commit fb2477b

Please sign in to comment.