From 6f8a9da19f33a62dbf7a2e81e8f7f1a46238d405 Mon Sep 17 00:00:00 2001 From: vadym Date: Mon, 12 Dec 2022 20:30:33 +0200 Subject: [PATCH] added get_user_home_path nethod for other OS --- contrib/ui/mesh-ui/webview_other.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/contrib/ui/mesh-ui/webview_other.go b/contrib/ui/mesh-ui/webview_other.go index 313ad87f..e4365ad5 100644 --- a/contrib/ui/mesh-ui/webview_other.go +++ b/contrib/ui/mesh-ui/webview_other.go @@ -3,5 +3,16 @@ package main +import "os" + +func get_user_home_path() string { + path, exists := os.LookupEnv("HOME") + if exists { + return path + } else { + return "" + } +} + func Console(show bool) { }