Set sensible defaults for Windows installations

Non-packaged execution will need this to be overridden anyway, and it
avoids a surprise "Drop state data into the current working directory"
event.

Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
v0.7
Paul "TBBle" Hampson 2020-01-06 01:03:58 +11:00
parent 2bee17a65a
commit e11b881c12
1 changed files with 11 additions and 3 deletions

View File

@ -1,9 +1,17 @@
package appdefaults
import (
"os"
"path/filepath"
)
const (
Address = "npipe:////./pipe/buildkitd"
Root = ".buildstate"
ConfigDir = ""
Address = "npipe:////./pipe/buildkitd"
)
var (
Root = filepath.Join(os.Getenv("ProgramData"), "buildkitd", ".buildstate")
ConfigDir = filepath.Join(os.Getenv("ProgramData"), "buildkitd")
)
func UserAddress() string {