fix env PATCHDIR
This commit is contained in:
parent
fc25cd8b05
commit
fda4b5448b
|
@ -116,34 +116,12 @@ func ConfigureENV() error {
|
|||
}
|
||||
}
|
||||
if os.Getenv("FORGE_PATCHDIR") == "" {
|
||||
os.Setenv("FORGE_PATCHDIR", os.Getenv("FORGE_GOSRC"))
|
||||
os.Setenv("FORGE_PATCHDIR", os.Getenv("FORGE_REPOPB"))
|
||||
}
|
||||
|
||||
return anyerr
|
||||
}
|
||||
|
||||
/*
|
||||
// look for a go.work file
|
||||
// otherwise use ~/go/src
|
||||
func findGoWork() (string, error) {
|
||||
pwd, err := os.Getwd()
|
||||
// startpwd, _ := os.Getwd()
|
||||
if err == nil {
|
||||
// Check for go.work in the current directory and then move up until root
|
||||
if pwd, err := digupWorkfile(pwd); err == nil {
|
||||
// log.Info("digupWorkfile() found an existing go.work file", pwd)
|
||||
return pwd, nil
|
||||
} else {
|
||||
// log.Info("digupWorkfile() go.work file error", err)
|
||||
return "", err
|
||||
}
|
||||
}
|
||||
// this shouldn't really happen. maybe your working directory got deleted
|
||||
// log.Info("forge.findGoWork() os.Getwd() was probably deleted", pwd, err)
|
||||
return "", err
|
||||
}
|
||||
*/
|
||||
|
||||
// this is the 'old way" and works fine for me. I use it because I like the ~/go/src directory
|
||||
// because I know exactly what is in it: GO stuff & nothing else
|
||||
func useGoSrc() (string, error) {
|
||||
|
|
Loading…
Reference in New Issue