Skip to content

Commit

Permalink
{CI} Fix invalid file path (Azure#30422)
Browse files Browse the repository at this point in the history
  • Loading branch information
evelyn-ys authored Nov 27, 2024
1 parent 064c250 commit 10bd6de
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1138,9 +1138,9 @@ jobs:
git fetch origin --depth=1 $(System.PullRequest.TargetBranch)
declare -A secret_files
for FILE in `git diff --name-only --diff-filter=AM origin/$(System.PullRequest.TargetBranch)` ; do
detected=$(azdev scan -f $FILE | python -c "import sys, json; print(json.load(sys.stdin)['secrets_detected'])")
detected=$(azdev scan -f "$FILE" | python -c "import sys, json; print(json.load(sys.stdin)['secrets_detected'])")
if [ $detected == 'True' ]; then
echo "Secrets detected from "$FILE", Please remove or replace it. You can leverage 'azdev scan'/'azdev mask' command if needed." 1>&2
printf "\033[0;31mDetected secrets from %s, You can run 'azdev mask' to remove secrets.\033[0m\n" "$FILE"
secret_files+=$FILE
fi
done
Expand Down

0 comments on commit 10bd6de

Please sign in to comment.