summaryrefslogtreecommitdiff
path: root/init.go
diff options
context:
space:
mode:
Diffstat (limited to 'init.go')
-rw-r--r--init.go14
1 files changed, 8 insertions, 6 deletions
diff --git a/init.go b/init.go
index c5b8264..ca5db21 100644
--- a/init.go
+++ b/init.go
@@ -144,7 +144,7 @@ func (f *Forge) setenv() {
}
// f.configDir = os.Getenv("FORGE_CONFIG")
f.goSrc = os.Getenv("FORGE_GOSRC")
- f.forgeURL = os.Getenv("FORGE_URL")
+ // f.forgeURL = os.Getenv("FORGE_URL")
f.hostname = os.Getenv("HOSTNAME")
if os.Getenv("FORGE_GOWORK") == "true" {
f.goWork = true
@@ -152,6 +152,7 @@ func (f *Forge) setenv() {
f.Config.ReposPB = os.Getenv("FORGE_REPOPB")
f.Config.PatchDir = os.Getenv("FORGE_PATCHDIR")
+ f.Config.ForgeURL = os.Getenv("FORGE_URL")
})
}
@@ -181,7 +182,7 @@ func checkenv() bool {
*/
func (f *Forge) GetForgeURL() string {
- return f.forgeURL
+ return f.Config.ForgeURL
}
// set the URL for forge otherwise fallback to ENV or to forge.wit.com
@@ -192,9 +193,9 @@ func (f *Forge) SetForgeURL(url string) {
if url == "" {
url = "https://forge.wit.com/"
}
- f.forgeURL = url
- os.Setenv("FORGE_URL", f.forgeURL)
- log.Info("Forge URL has been set to", f.forgeURL)
+ f.Config.ForgeURL = url
+ os.Setenv("FORGE_URL", f.Config.ForgeURL)
+ log.Info("Forge URL has been set to", f.Config.ForgeURL)
}
// the first thing done is process any ENV settings
@@ -227,7 +228,8 @@ func (f *Forge) configENV() bool {
// f.configDir = os.Getenv("FORGE_CONFIG")
f.goSrc = os.Getenv("FORGE_GOSRC")
- f.forgeURL = os.Getenv("FORGE_URL")
+ // f.forgeURL = os.Getenv("FORGE_URL")
+ f.Config.ForgeURL = os.Getenv("FORGE_URL")
// f.patchDir = os.Getenv("FORGE_PATCHDIR")
f.hostname = os.Getenv("HOSTNAME")
if os.Getenv("FORGE_GOWORK") == "true" {