feat: add AppHostRoot() function

This makes it a bit easier to fetch files from the host path
This commit is contained in:
Jose Diaz-Gonzalez
2020-07-17 19:45:05 -04:00
parent a97f1d02cf
commit 5d08964699

View File

@@ -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")