Skip to content

Commit

Permalink
fix home directory for macos
Browse files Browse the repository at this point in the history
  • Loading branch information
thdxr committed Dec 22, 2023
1 parent 1f1cb0f commit 83bd45f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions pkg/global/global.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,12 @@ func InstallPlugins() error {
}

func NeedsPulumi() bool {
os.Setenv("PATH", os.Getenv("PATH")+":~/.pulumi/bin")
_, err := exec.LookPath("pulumi")
home, err := os.UserHomeDir()
if err != nil {
panic(err)
}
os.Setenv("PATH", os.Getenv("PATH")+":"+home+"/.pulumi/bin")
_, err = exec.LookPath("pulumi")
if err != nil {
return true
}
Expand Down

0 comments on commit 83bd45f

Please sign in to comment.