We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 26a597c commit bfbf21bCopy full SHA for bfbf21b
cmd/runtipi/main.go
@@ -19,10 +19,15 @@ var (
19
20
func init() {
21
var err error
22
- config.RootFolder, err = os.Getwd()
23
- if err != nil {
24
- fmt.Println("Error getting working directory:", err)
25
- os.Exit(1)
+
+ config.RootFolder = os.Getenv("ROOT_FOLDER_HOST")
+ if config.RootFolder == "" {
26
+ config.RootFolder, err = os.Getwd()
27
+ if err != nil {
28
+ fmt.Println("Error getting working directory:", err)
29
+ os.Exit(1)
30
+ }
31
}
32
33
if envRootFolder := os.Getenv("ROOT_FOLDER_HOST"); envRootFolder != "" {
internal/config/config.go
@@ -1,3 +1,4 @@
1
+// Package config provides application configuration details.
2
package config
3
4
type AppInfo struct {
0 commit comments