Skip to content
This repository has been archived by the owner on Oct 12, 2022. It is now read-only.

Commit

Permalink
Merge pull request #232 from Microsoft/users/angoya/regex
Browse files Browse the repository at this point in the history
Minor fix for masking regex from logs. We were filtering the regex based on the variables. Removing that check
  • Loading branch information
bryanmacfarlane committed Feb 26, 2016
2 parents e99df48 + 5ac3e4e commit 9593218
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/agent/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -430,11 +430,14 @@ function createMaskFunction(jobEnvironment: agentifm.JobEnvironment): Replacemen
var envMasks = jobEnvironment.mask || [];
var maskHints = [];
envMasks.forEach((maskHint: agentifm.MaskHint) => {
if ((maskHint.type === agentifm.MaskType.Variable || maskHint.type === agentifm.MaskType.Regex) && maskHint.value) {
if (maskHint.type === agentifm.MaskType.Variable && maskHint.value) {
if (jobEnvironment.variables[maskHint.value]) {
maskHints.push(maskHint);
}
}
else if (maskHint.type === agentifm.MaskType.Regex && maskHint.value) {
maskHints.push(maskHint);
}
});

if (maskHints.length > 0) {
Expand Down

0 comments on commit 9593218

Please sign in to comment.