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

@@ -1,6 +1,8 @@
package apps
import (
"strings"
"github.com/dokku/dokku/plugins/common"
)
@@ -12,7 +14,7 @@ func ReportSingleApp(appName, infoFlag string) error {
deploySource := ""
if b, err := common.PlugnTriggerSetup("deploy-source", []string{appName}...).SetInput("").Output(); err != nil {
deploySource = string(b[:])
deploySource = strings.TrimSpace(string(b[:]))
}
locked := "false"