From 9f4f0dcce4c15a1a4d2de4803cd2262e73b8eba1 Mon Sep 17 00:00:00 2001 From: "Alex Ellis (OpenFaaS Ltd)" Date: Wed, 4 Mar 2020 21:20:21 +0000 Subject: [PATCH] Stop linkerd from creating folder during get.sh Fixes an issue seen by Kah Keng Tay and "Joe" whilst trying the workshop. Signed-off-by: Alex Ellis (OpenFaaS Ltd) --- cmd/apps/linkerd_app.go | 2 +- pkg/config/config.go | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/cmd/apps/linkerd_app.go b/cmd/apps/linkerd_app.go index 278b3ad6a..2f869d0b6 100644 --- a/cmd/apps/linkerd_app.go +++ b/cmd/apps/linkerd_app.go @@ -175,7 +175,7 @@ func getUserPath() (string, error) { } func getExportPath() string { - userPath, _ := getUserPath() + userPath := config.GetUserDir() return path.Join(userPath, "bin/") } diff --git a/pkg/config/config.go b/pkg/config/config.go index 662bd20ab..c8b4fdf9c 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -9,6 +9,12 @@ import ( // K3sVersion default version const K3sVersion = "v1.17.2+k3s1" +func GetUserDir() string { + home := os.Getenv("HOME") + root := fmt.Sprintf("%s/.arkade/", home) + return root +} + func InitUserDir() (string, error) { home := os.Getenv("HOME") root := fmt.Sprintf("%s/.arkade/", home)