deprecate old ENV var

This commit is contained in:
Jeff Carr 2025-09-13 05:32:51 -05:00
parent de7b14f3c6
commit f6b19522c6
1 changed files with 0 additions and 19 deletions

View File

@ -39,7 +39,6 @@ import (
//
// This routine ensures the following ENV vars are set:
//
// FORGE_CONFIG == where forge's configs are stored (normally ~/.config/forge)
// FORGE_REPOSPB == where the repos.pb protobuf cache file is stored (normally ~/.cache/forge/repos.pb)
// FORGE_GOSRC == based on the path, what the user probably want for developing in GO (Defaults to ~/go/src)
// FORGE_GOWORK == true or false depending on the GOSRC result
@ -59,7 +58,6 @@ func ConfigureENV() error {
}
func DumpENV(what string) {
log.Printf("%s FORGE_CONFIG = %s\n", what, os.Getenv("FORGE_CONFIG"))
log.Printf("%s FORGE_REPOSDIR = %s\n", what, os.Getenv("FORGE_REPOSDIR"))
log.Printf("%s FORGE_REPOSPB = %s\n", what, os.Getenv("FORGE_REPOSPB"))
log.Printf("%s FORGE_PATCHDIR = %s\n", what, os.Getenv("FORGE_PATCHDIR"))
@ -73,23 +71,6 @@ func DumpENV(what string) {
// always set them to _something_ even when everything seems to be failing
func doConfigureENV() error {
var anyerr error
if os.Getenv("FORGE_CONFIG") != "" {
return nil
}
// setup the forge config dir
if os.Getenv("FORGE_CONFIG") == "" {
homeDir, err := getConfigDir()
if err == nil {
fullpath := filepath.Join(homeDir, ".config/forge")
os.MkdirAll(fullpath, os.ModePerm)
os.Setenv("FORGE_CONFIG", fullpath)
} else {
log.Info("user home dir error", err)
os.Setenv("FORGE_CONFIG", "/tmp")
anyerr = err
}
}
if os.Getenv("FORGE_REPOSDIR") == "" {
reposDir, err := getReposDir()
if err != nil {