summaryrefslogtreecommitdiff
path: root/config.go
diff options
context:
space:
mode:
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)
}