Skip to content

Commit

Permalink
fix(secrets): be more forgiving when getting path
Browse files Browse the repository at this point in the history
  • Loading branch information
philippfromme committed Aug 28, 2023
1 parent 4c0c0aa commit 102936b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion rules/camunda-cloud/secrets.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,13 @@ function validateSubscription(node) {
}

function getReport(propertyName, node, parentNode) {
const path = getPath(node, parentNode);

return {
message: `Property <${ propertyName }> is not a valid secret`,
path: [ ...getPath(node, parentNode), propertyName ],
path: path
? [ ...getPath(node, parentNode), propertyName ]
: [ propertyName ],
data: {
type: ERROR_TYPES.SECRET_EXPRESSION_INVALID,
node,
Expand Down

0 comments on commit 102936b

Please sign in to comment.