mirror of
https://github.com/Cheviiot/Vintner.git
synced 2026-08-03 15:57:24 +00:00
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.
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
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
|
||||
}
|
||||
Reference in New Issue
Block a user