fix: ensure all byte output is trimmed of whitespace

This otherwise causes issues when interpreting the output as part of a variable, such as when constructing the deploying app image.

Closes #4229
This commit is contained in:
Jose Diaz-Gonzalez
2020-12-13 02:04:35 -05:00
parent ca2de6a4a3
commit 8c14bb9aeb
4 changed files with 10 additions and 8 deletions

View File

@@ -137,7 +137,7 @@ func DockerCleanup(appName string, forceCleanup bool) error {
skipCleanup := false
if appName != "" {
b, _ := PlugnTriggerOutput("config-get", []string{appName, "DOKKU_SKIP_CLEANUP"}...)
output := string(b[:])
output := strings.TrimSpace(string(b[:]))
if output == "true" {
skipCleanup = true
}