Files
Vintner/cmd/msvc-go-wine/paths.go
T
Cheviiot 8f52e5861a Default download/install to ~/.msvc-go-wine when no dir is given
--dest (download) and the positional dir (install) were previously
required, forcing every user to pick and remember a location. Both now
default to a single hidden ~/.msvc-go-wine, matching the convention most
CLI tools use for their own data dir - still overridable for anyone who
wants a different location.
2026-07-25 01:38:47 +10:00

18 lines
388 B
Go

package main
import (
"os"
"path/filepath"
)
// defaultToolchainDir is where `download`/`install` operate when the user
// doesn't specify a directory: a hidden ~/.msvc-go-wine, so it doesn't
// clutter a plain `ls ~`.
func defaultToolchainDir() (string, error) {
home, err := os.UserHomeDir()
if err != nil {
return "", err
}
return filepath.Join(home, ".msvc-go-wine"), nil
}