summaryrefslogtreecommitdiff
path: root/config.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-09-26 02:18:22 -0500
committerJeff Carr <[email protected]>2025-09-26 02:18:22 -0500
commit95663ece2bdfaad9edcd64045005f1cde6c15e2a (patch)
treeaea9f6106546d0f323babca39e0115d745f1462f /config.go
parentd02a34b04baaa8c5570464bbab26fa4b6e4e0cd7 (diff)
remove ENV stuffv0.0.49
Diffstat (limited to 'config.go')
-rw-r--r--config.go13
1 files changed, 2 insertions, 11 deletions
diff --git a/config.go b/config.go
index 81dba5a..288e4c3 100644
--- a/config.go
+++ b/config.go
@@ -22,21 +22,12 @@ func configInit() *forgepb.ForgeConfigs {
HOSTNAME = argv.Hostname
}
- // the default forged dir is /home/forge
- if os.Getenv("FORGE_REPODIR") == "" {
- os.Setenv("FORGE_REPODIR", "/home/forge")
- }
-
- if os.Getenv("FORGE_PATCHDIR") == "" {
- os.Setenv("FORGE_PATCHDIR", "/var/lib/forged")
- }
-
configs := new(forgepb.ForgeConfigs)
err := config.ConfigLoad(configs, ARGNAME, "forge")
if errors.Is(err, os.ErrNotExist) {
- configs.ReposDir = os.Getenv("FORGE_REPODIR")
+ configs.ReposDir = "/var/cache/forged"
configs.ReposPB = filepath.Join(configs.ReposDir, "repos.pb")
- configs.PatchDir = os.Getenv("FORGE_PATCHDIR")
+ configs.PatchDir = "/var/cache/forged"
if err := configSave(); err != nil {
badExit(err)
}