From 19acbcbaade582dd19edbc36254e32a49c44309d Mon Sep 17 00:00:00 2001 From: Paulo Truta Date: Sun, 8 Dec 2024 21:16:33 +0100 Subject: [PATCH] Hotfix: Add correct path for internet url option of browser dev environment --- internal/tasks/tasks.go | 2 +- internal/utils/utils.go | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/internal/tasks/tasks.go b/internal/tasks/tasks.go index f8b6b69..86087f1 100644 --- a/internal/tasks/tasks.go +++ b/internal/tasks/tasks.go @@ -1169,7 +1169,7 @@ func taskGetBrowserDevStatus() string { func taskGetBrowserDevUrl() string { url := "" - myEdgeAppServiceEnv, err := godotenv.Read(utils.GetPath(utils.EdgeAppsPath) + "dev/myedgeapp.env") + myEdgeAppServiceEnv, err := godotenv.Read(utils.GetPath(utils.BrowserDevPath) + "myedgeapp.env") if err != nil { log.Println("No myedge.app environment file found. Status is Network-Only") url = "http://dev." + system.GetHostname() + ".local" diff --git a/internal/utils/utils.go b/internal/utils/utils.go index 71400d6..a2ba471 100644 --- a/internal/utils/utils.go +++ b/internal/utils/utils.go @@ -111,6 +111,7 @@ const ApiPath string = "apiPath" const EdgeAppsPath string = "edgeAppsPath" const EdgeAppsBackupPath string = "edgeAppsBackupPath" const WsPath string = "wsPath" +const BrowserDevPath string = "browserDevPath" const LoggerPath string = "loggerPath" const BrowserDevPasswordFileLocation string = "browserDevPasswordFileLocation" const BrowserDevProxyPath string = "browserDevProxyPath" @@ -176,6 +177,14 @@ func GetPath(pathKey string) string { targetPath = "/home/system/components/ws/" } + case BrowserDevPath: + + if env["BROWSERDEV_PATH"] != "" { + targetPath = env["BROWSERDEV_PATH"] + } else { + targetPath = "/home/system/components/dev/" + } + case LoggerPath: if env["LOGGER_PATH"] != "" { targetPath = env["LOGGER_PATH"]