From 5d089646992aab4b0bffd3804fde9fcbfd276747 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Fri, 17 Jul 2020 19:45:05 -0400 Subject: [PATCH] feat: add AppHostRoot() function This makes it a bit easier to fetch files from the host path --- plugins/common/common.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/plugins/common/common.go b/plugins/common/common.go index b34cee5bc..9dfa5c811 100644 --- a/plugins/common/common.go +++ b/plugins/common/common.go @@ -80,6 +80,12 @@ func AppRoot(appName string) string { return fmt.Sprintf("%v/%v", dokkuRoot, appName) } +// AppRoot returns the app root path +func AppHostRoot(appName string) string { + dokkuHostRoot := MustGetEnv("DOKKU_HOST_ROOT") + return fmt.Sprintf("%v/%v", dokkuHostRoot, appName) +} + // AskForDestructiveConfirmation checks for confirmation on destructive actions func AskForDestructiveConfirmation(name string, objectType string) error { LogWarn("WARNING: Potentially Destructive Action")