diff --git a/src/csfilter-kfp b/src/csfilter-kfp index 02e41fb..8628195 100755 --- a/src/csfilter-kfp +++ b/src/csfilter-kfp @@ -113,7 +113,7 @@ def construct_path_filter(args): cmd += ' re=\n' cmd += ' while read line; do\n' cmd += ' re="${re}|(${line})"\n' - cmd += ' done < <(grep -Esv \'^(#|$)\' "$ep")\n' + cmd += ' done < <(grep -Esv \'^(#| *$)\' "$ep")\n' cmd += ' if test -n "$re"; then\n' cmd += ' csgrep --mode=json --invert-match --path="${re#|}"\n' cmd += ' else\n' diff --git a/tests/csfilter-kfp/0002-stdout.txt b/tests/csfilter-kfp/0002-stdout.txt index 81b381d..c759009 100644 --- a/tests/csfilter-kfp/0002-stdout.txt +++ b/tests/csfilter-kfp/0002-stdout.txt @@ -13,7 +13,7 @@ path_filter() { re= while read line; do re="${re}|(${line})" - done < <(grep -Esv '^(#|$)' "$ep") + done < <(grep -Esv '^(#| *$)' "$ep") if test -n "$re"; then csgrep --mode=json --invert-match --path="${re#|}" else diff --git a/tests/csfilter-kfp/0004-kfp/WALinuxAgent/exclude-paths.txt b/tests/csfilter-kfp/0004-kfp/WALinuxAgent/exclude-paths.txt index 610b44f..80a88c9 100644 --- a/tests/csfilter-kfp/0004-kfp/WALinuxAgent/exclude-paths.txt +++ b/tests/csfilter-kfp/0004-kfp/WALinuxAgent/exclude-paths.txt @@ -1,4 +1,4 @@ - + WALinuxAgent[^/]*/dcr/.* # dcr' is a testing pipeline for WALA and it is packaged by an oversight, the code is not used. It was removed in the current upstream so this will be gone with WALA rebase.