Skip to content

Commit

Permalink
Merge pull request #214 from TIBCOSoftware/decodevalue
Browse files Browse the repository at this point in the history
Fix the issue that have problem to replace decoded value back to app …
  • Loading branch information
lixingwang authored Aug 10, 2018
2 parents 7d11eee + caac776 commit c80a561
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions app/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ import (
"github.com/TIBCOSoftware/flogo-lib/core/action"
"github.com/TIBCOSoftware/flogo-lib/core/data"
"github.com/TIBCOSoftware/flogo-lib/core/trigger"
"regexp"
"io/ioutil"
"regexp"
"strings"
)

// App is the configuration for the App
Expand Down Expand Up @@ -96,8 +97,8 @@ func preprocessConfig(appJson []byte) ([]byte, error) {
if err != nil {
return nil, err
}
mreg := regexp.MustCompile(string(match))
appJson = mreg.ReplaceAll([]byte(appJson), []byte(decodedValue))
appstring := strings.Replace(string(appJson), string(match), decodedValue, -1)
appJson = []byte(appstring)
}

return appJson, nil
Expand Down

0 comments on commit c80a561

Please sign in to comment.