You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
NPM_PACKAGE_JSON_ARTIFACTS_DIRECTORY=${NPM_PACKAGE_JSON_ARTIFACTS_DIRECTORY:-"npm-package-json"}# Subdirectory of "artifacts" containing the npm package.json files to scan
17
+
18
+
## Get this "scripts" directory if not already set
19
+
# Even if $BASH_SOURCE is made for Bourne-like shells it is also supported by others and therefore here the preferred solution.
20
+
# CDPATH reduces the scope of the cd command to potentially prevent unintended directory changes.
21
+
# This way non-standard tools like readlink aren't needed.
22
+
SCRIPTS_DIR=${SCRIPTS_DIR:-$( CDPATH=. cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd -P )}# Repository directory containing the shell scripts
23
+
echo"test: SCRIPTS_DIR=${SCRIPTS_DIR}"
24
+
25
+
#Explanation of the command changes:
26
+
# -path ./node_modules -prune: This part of the command tells find to skip the node_modules directory.
27
+
# -o: This is the logical OR operator. It allows you to combine conditions. The -prune action will prevent find from descending into node_modules directories.
28
+
# -name 'package.json': This part of the command looks for files named package.json.
29
+
# -exec sh -c 'for f; do ... done' sh {} +: Executes the given shell command for each found package.json file.
0 commit comments