Skip to content

Commit

Permalink
Honor userBinPath on window platform
Browse files Browse the repository at this point in the history
  • Loading branch information
Pierre Téchoueyres committed Jun 15, 2024
1 parent dd399ad commit b86f96b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/install.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,9 @@ func installableBinLocation(product Product, userBinPath string) string {
binPathWritable := false //assume bin path is not writable
if runtime.GOOS != "windows" {
binPathWritable = CheckDirWritable(binDir) //check if is writable on ( only works on LINUX)
} else {
logger.Infof("Installing %s at %q", product.GetName(), userBinPath)
return filepath.Join(userBinPath)
}

// IF: "/usr/local/bin" or `custom bin path` provided by user is non-writable, (binPathWritable == false), we will attempt to install terraform at the ~/bin location. See ELSE
Expand Down

0 comments on commit b86f96b

Please sign in to comment.