verbose: remove system package interaction

Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
This commit is contained in:
2024-09-12 21:07:05 +09:00
parent b0aff89166
commit da6d238d8a
13 changed files with 85 additions and 107 deletions

View File

@@ -7,12 +7,12 @@ import (
"strconv"
)
func Retrieve(verbose bool) {
func Retrieve() {
if V != nil {
panic("system info retrieved twice")
}
v := &Values{Share: path.Join(os.TempDir(), "fortify."+strconv.Itoa(os.Geteuid())), Verbose: verbose}
v := &Values{Share: path.Join(os.TempDir(), "fortify."+strconv.Itoa(os.Geteuid()))}
if r, ok := os.LookupEnv(xdgRuntimeDir); !ok {
fmt.Println("Env variable", xdgRuntimeDir, "unset")

View File

@@ -8,7 +8,6 @@ type Values struct {
Share string
Runtime string
RunDir string
Verbose bool
}
var V *Values