From 5754232ee901e2c96ccc106dca5acc0d2b1ffa78 Mon Sep 17 00:00:00 2001 From: Willy Kloucek Date: Thu, 14 Oct 2021 17:21:57 +0200 Subject: [PATCH] introduce secret `OCIS_BASE_DATA_PATH` --- ocis-pkg/config/defaults/paths.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ocis-pkg/config/defaults/paths.go b/ocis-pkg/config/defaults/paths.go index 8a70f85f22c..002dc01f7ea 100644 --- a/ocis-pkg/config/defaults/paths.go +++ b/ocis-pkg/config/defaults/paths.go @@ -16,6 +16,15 @@ var ( ) func BaseDataPath() string { + + // It is not nice to have hidden / secrete configuration options + // But how can we update the base path for every occurence with a flageset option? + // This is currenlty not possible and needs a new configuration concept + p := os.Getenv("OCIS_BASE_DATA_PATH") + if p == "" { + return p + } + switch BaseDataPathType { case "homedir": dir, err := os.UserHomeDir()