From d05e3dffbf5578ee5c69baecf2f31176aedf94d4 Mon Sep 17 00:00:00 2001 From: Jake Carter Date: Mon, 26 Jun 2023 17:43:04 -0500 Subject: [PATCH] Add null terminator check --- .github/workflows/Build_Examples.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/Build_Examples.yml b/.github/workflows/Build_Examples.yml index 48748ffd712..850e0e6bfd0 100644 --- a/.github/workflows/Build_Examples.yml +++ b/.github/workflows/Build_Examples.yml @@ -102,10 +102,13 @@ jobs: $CHANGE_FILES = [string](git diff --ignore-submodules --name-only remotes/origin/main) # Check for change files by checking for watched file substrings # For powershell substring: (https://stackoverflow.com/a/31603685) - if ($($WATCH_FILES | %{$CHANGE_FILES.contains($_)}) -contains $true) + if ( $CHANGE_FILES ) # null check { - echo "Match found." - $RUN_TEST = 1 + if ($($WATCH_FILES | %{$CHANGE_FILES.contains($_)}) -contains $true) + { + echo "Match found." + $RUN_TEST = 1 + } } }