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
echo"Checking response file for CDS files to index"
24
+
if [ !-f"${_cds_extractor_js_path}" ];then
25
+
echo"Error: The 'cds-extractor.js' script does not exist at the expected path: ${_cds_extractor_js_path}"
26
+
echo"Please ensure that the script has been built and is available in the 'out' directory."
27
+
exit 3
28
+
fi
32
29
33
-
# Terminate early if the _response_file_path doesn't exist or is empty,
34
-
# which indicates that no CDS files were selected or found.
35
-
if [ !-f"$_response_file_path" ] || [ !-s"$_response_file_path" ]
36
-
then
37
-
echo"'codeql database cds-extractor --language cds' command terminated early as response file '$_response_file_path' does not exist or is empty. This is because no CDS files were selected or found."
38
-
# Exit without error to avoid failing any calling (javascript)
39
-
# extractor, and llow the tool the report the lack of coverage
40
-
# for CDS files.
41
-
exit 0
30
+
if [ !-d"${_cds_extractor_node_modules_dir}" ];then
31
+
echo"Error: The 'node_modules' directory does not exist at the expected path: ${_cds_extractor_node_modules_dir}"
32
+
echo"Please ensure that the dependencies have been installed by running 'npm install' in the 'extractors/cds/tools' directory."
33
+
exit 4
42
34
fi
43
35
44
-
# Change to the directory of this script to ensure that npm looks up the
36
+
# Change to the directory of this shell script to ensure that npm looks up the
45
37
# package.json file in the correct directory and installs the dependencies
46
38
# (i.e. node_modules) relative to this directory. This is technically a
47
39
# violation of the assumption that extractor scripts will be run with the
48
40
# current working directory set to the root of the project source, but we
49
41
# also need node_modules to be installed here and not in the project source
50
42
# root, so we make a compromise of:
51
-
# 1. changing to this script's directory;
52
-
# 2. installing node dependencies here;
53
-
# 3. passing the original working directory as a parameter to the
43
+
# 1. changing to this shell script's directory;
44
+
# 2. passing the original working directory as a parameter to the
54
45
# cds-extractor.js script;
55
-
#4. expecting the cds-extractor.js script to immediately change back to
46
+
#3. expecting the cds-extractor.js script to immediately change back to
56
47
# original working (aka the project source root) directory.
0 commit comments