Skip to content

Commit 26eefec

Browse files
committed
#1353 Document the diferent sentinel character to separate npm package entries
Signed-off-by: Sven Strittmatter <sven.strittmatter@iteratec.com>
1 parent e4d21b0 commit 26eefec

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

bin/npm-ci-all.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
set -euo pipefail
44

5+
# Found directives are delimited by : to make this script failsafe,
6+
# if the repository working copy is cloned into a directory which
7+
# contains white spaces in the file name.
58
# This find construct is based on https://stackoverflow.com/questions/4210042/how-to-exclude-a-directory-in-find-command/4210072#4210072
69
PACKAGE_JSON_LIST=$(find "$PROJECT_DIR" \( \
710
-name .git -o \
@@ -24,6 +27,7 @@ PACKAGE_JSON_LIST=$(find "$PROJECT_DIR" \( \
2427
-exec printf '%s:' {} + | sed '$s/:$/\n/')
2528
# Print each path w/o newline but w/ : appended and then remove the last : with sed.
2629

30+
# We split on colon instead of any white space in the for loop.
2731
IFS=':'
2832
for package in $PACKAGE_JSON_LIST; do
2933
echo "- ${package}"

0 commit comments

Comments
 (0)