chore: switch to correct trigger when getting a global argument
While both will now work, using the correct trigger will skip some extra logic.
This commit is contained in:
1 parent
d243433625
commit
652a9ec26c
1 file changed
+8
-1
@@ -172,7 +172,14 @@ func DockerCleanup(appName string, forceCleanup bool) error {
|
|||||||
if !forceCleanup {
|
if !forceCleanup {
|
||||||
skipCleanup := false
|
skipCleanup := false
|
||||||
if appName != "" {
|
if appName != "" {
|
||||||
b, _ := PlugnTriggerOutput("config-get", []string{appName, "DOKKU_SKIP_CLEANUP"}...)
|
triggerName := "config-get"
|
||||||
|
triggerArgs := []string{appName, "DOKKU_SKIP_CLEANUP"}
|
||||||
|
if appName == "--global" {
|
||||||
|
triggerName = "config-get-global"
|
||||||
|
triggerArgs = []string{"DOKKU_SKIP_CLEANUP"}
|
||||||
|
}
|
||||||
|
|
||||||
|
b, _ := PlugnTriggerOutput(triggerName, triggerArgs...)
|
||||||
output := strings.TrimSpace(string(b[:]))
|
output := strings.TrimSpace(string(b[:]))
|
||||||
if output == "true" {
|
if output == "true" {
|
||||||
skipCleanup = true
|
skipCleanup = true
|
||||||
|
|||||||
Reference in new issue
Block a user