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 committed 2020-08-30 13:41:14 -04:00
1 parent a97f1d02cf
commit 5d08964699
1 file changed
+6
+6
View File
@@ -80,6 +80,12 @@ func AppRoot(appName string) string {
return fmt.Sprintf("%v/%v", dokkuRoot, appName) 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 // AskForDestructiveConfirmation checks for confirmation on destructive actions
func AskForDestructiveConfirmation(name string, objectType string) error { func AskForDestructiveConfirmation(name string, objectType string) error {
LogWarn("WARNING: Potentially Destructive Action") LogWarn("WARNING: Potentially Destructive Action")