mirror of
https://github.com/Cheviiot/Vintner.git
synced 2026-08-03 15:57:24 +00:00
--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.
18 lines
388 B
Go
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
|
|
}
|