mirror of
https://github.com/pocketbase/pocketbase.git
synced 2026-10-10 16:27:26 +02:00
check the default user cachedir if GOCACHE is not explicitly set
This commit is contained in:
1 parent
40f2ba731c
commit
eda90d4555
4 files changed
+78
-51
No files matched your search
@@ -63,17 +63,3 @@ func YesNoPrompt(message string, fallback bool) bool {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// IsProbablyGoRun loosely checks if the current executable is running
|
||||
// as a result of "go run".
|
||||
func IsProbablyGoRun() bool {
|
||||
runDirs := []string{os.TempDir(), os.Getenv("GOCACHE")}
|
||||
|
||||
for _, dir := range runDirs {
|
||||
if dir != "" && strings.HasPrefix(os.Args[0], dir) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
Reference in new issue
Block a user