github.com/engineyard/workflow-cli@v2.21.6+incompatible/settings/home_windows.go (about)

     1  // +build windows
     2  
     3  package settings
     4  
     5  import "os"
     6  
     7  // FindHome returns the HOME directory of the current user
     8  func FindHome() string {
     9  	return os.Getenv("HOMEDRIVE") + os.Getenv("HOMEPATH")
    10  }
    11  
    12  // SetHome sets the HOME directory of the current user
    13  func SetHome(path string) {
    14  	os.Setenv("HOMEDRIVE", path[:2])
    15  	os.Setenv("HOMEPATH", path[2:])
    16  }