Skip to content

Commit 6783f51

Browse files
committed
build: fix sed expression to properly extract package directories
1 parent ef06a2d commit 6783f51

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.github/workflows/scripts/lint_package_json_files

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ fi
5151
# Check if metadata fields need to be updated in package.json files of affected packages:
5252
dirs=$(echo "${files_to_process}" | tr ' ' '\n' | \
5353
xargs dirname | \
54-
sed -E 's/\/(benchmark|bin|data|docs|etc|examples|include|lib|scripts|src|test)\/?$//' | \
54+
sed -E 's/\/(benchmark|bin|data|docs|etc|examples|include|lib|scripts|src|test)(\/.*)?$//' | \
5555
sort -u)
5656

5757
echo "Checking package.json files in directories: ${dirs}"
@@ -62,7 +62,7 @@ for dir in ${dirs}; do
6262
"${update_package_json_directories}" "${dir}"
6363
"${update_package_json_gypfile}" "${dir}"
6464
if ! git diff-index --quiet HEAD -- "${dir}/package.json"; then
65-
echo "ERROR: Package.json in ${dir} needs updates to directories and/or gypfile fields"
65+
echo "ERROR: package.json in ${dir} needs updates to directories and/or gypfile fields"
6666
git --no-pager diff "${dir}/package.json"
6767
needs_changes=1
6868
fi

0 commit comments

Comments
 (0)