From 6166eb68034fa2986597f72757c5c80fec5f3eeb Mon Sep 17 00:00:00 2001 From: Robert Williams Date: Thu, 28 Nov 2019 18:03:35 +0000 Subject: [PATCH] Allow expansion of path variables (such as $HOME) from the bin path value provided in the tfswitch.toml configuration file. --- main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.go b/main.go index f5280793..ee36843a 100644 --- a/main.go +++ b/main.go @@ -88,7 +88,7 @@ func main() { bin := viper.Get("bin") // read custom binary location if binPath == defaultBin && bin != nil { // if the bin path is the same as the default binary path and if the custom binary is provided in the toml file (use it) - binPath = bin.(string) + binPath = os.ExpandEnv(bin.(string)) } version := viper.Get("version") //attempt to get the version if it's provided in the toml