Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions pkg/runner/expression.go
Original file line number Diff line number Diff line change
Expand Up @@ -234,11 +234,11 @@ type expressionEvaluator struct {

func (ee expressionEvaluator) evaluate(ctx context.Context, in string, defaultStatusCheck exprparser.DefaultStatusCheck) (interface{}, error) {
logger := common.Logger(ctx)
logger.Debugf("evaluating expression '%s'", in)
printableInput := regexp.MustCompile(`::add-mask::.*`).ReplaceAllString(in, "::add-mask::***")
logger.Debugf("evaluating expression '%s'", printableInput)
evaluated, err := ee.interpreter.Evaluate(in, defaultStatusCheck)

printable := regexp.MustCompile(`::add-mask::.*`).ReplaceAllString(fmt.Sprintf("%t", evaluated), "::add-mask::***)")
logger.Debugf("expression '%s' evaluated to '%s'", in, printable)
logger.Debugf("expression '%s' evaluated to '%t'", printableInput, evaluated)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

evaluated being the text of run: , not only true or false

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Afaik '%t' converts it to a boolean.
Would you rather I masked it and printed it out as string?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I realized it would print the string with an %!t(string=..., fixed


return evaluated, err
}
Expand Down