fix: correct issue with app autocreation

This commit is contained in:
Jose Diaz-Gonzalez committed 2020-03-11 01:00:10 -04:00
1 parent 7fd1882dbb
commit 0be0ad7ef7
2 files changed
+4 -3

No files matched your search

+2 -1
View File
@@ -149,7 +149,8 @@ func maybeCreateApp(appName string) error {
return nil return nil
} }
disableAutocreate := os.Getenv("DOKKU_GLOBAL_DISABLE_AUTOCREATE") b, _ := common.PlugnTriggerOutput("config-get-global", []string{"DOKKU_DISABLE_APP_AUTOCREATION"}...)
disableAutocreate := string(b[:])
if disableAutocreate == "true" { if disableAutocreate == "true" {
common.LogWarn("App auto-creation disabled.") common.LogWarn("App auto-creation disabled.")
return fmt.Errorf("Re-enable app auto-creation or create an app with 'dokku apps:create %s'", appName) return fmt.Errorf("Re-enable app auto-creation or create an app with 'dokku apps:create %s'", appName)
+2 -2
View File
@@ -6,7 +6,7 @@ import "fmt"
func TriggerConfigGet(appName string, key string) error { func TriggerConfigGet(appName string, key string) error {
value, ok := Get(appName, key) value, ok := Get(appName, key)
if ok { if ok {
fmt.Println(value) fmt.Print(value)
} }
return nil return nil
@@ -16,7 +16,7 @@ func TriggerConfigGet(appName string, key string) error {
func TriggerConfigGetGlobal(key string) error { func TriggerConfigGetGlobal(key string) error {
value, ok := Get("--global", key) value, ok := Get("--global", key)
if ok { if ok {
fmt.Println(value) fmt.Print(value)
} }
return nil return nil