Skip to content

Commit

Permalink
fixup! fixup! fixup! fixup! Fixes #19729: Secret variable engine
Browse files Browse the repository at this point in the history
Fixes #19729: Secret variable engine
  • Loading branch information
ElaadF committed Aug 7, 2021
1 parent 410699e commit 17ff7e1
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,9 @@ object SecretVariableEngine extends RudderPropertyEngine {
content <- IOResult.effect(s"File ${secretsFile.pathAsString} not found. Please make sure `secret-management` plugin is installed") {
secretsFile.contentAsString(StandardCharsets.UTF_8)
}
json <- IOResult.effect(JsonParser.parse(content)).chainError("tr")
secrets <- IOResult.effect((json \ "secrets").extract[List[Secret]]).chainError("fr")
json <- IOResult.effect(JsonParser.parse(content)).chainError(s"Parsing JSON in $secretsFile have failed")
secrets <- IOResult.effect((json \ "secrets").extract[List[Secret]])
.chainError(s"Unable to find parameter `secrets` in $secretsFile. Verify that the file is well formatted")

} yield {
secrets.find(_.name == namespace.head) match {
Expand Down

0 comments on commit 17ff7e1

Please sign in to comment.