Skip to content

Commit f686f83

Browse files
committed
Warn about missing npm package links without failing
1 parent 97f9637 commit f686f83

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

scripts/prepareAnalysis.sh

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ TYPESCRIPT_CYPHER_DIR="$CYPHER_DIR/Typescript_Enrichment"
4343
GENERAL_ENRICHMENT_CYPHER_DIR="${CYPHER_DIR}/General_Enrichment"
4444

4545
COLOR_RED='\033[0;31m'
46+
COLOR_YELLOW='\033[0;33m'
4647
COLOR_DEFAULT='\033[0m'
4748

4849
# Preparation - Data verification: DEPENDS_ON relationships
@@ -82,10 +83,11 @@ execute_cypher "${TYPESCRIPT_CYPHER_DIR}/Remove_duplicate_CONTAINS_relations_bet
8283
execute_cypher "${TYPESCRIPT_CYPHER_DIR}/Link_projects_to_npm_packages.cypher"
8384
dataVerificationResult=$( execute_cypher "${TYPESCRIPT_CYPHER_DIR}/Verify_projects_linked_to_npm_packages.cypher" "${@}")
8485
if is_csv_column_greater_zero "${dataVerificationResult}" "unresolvedProjectsCount"; then
85-
# There are Typescript projects and the unresolvedProjectsCount is greater than zero
86-
echo -e "${COLOR_RED}prepareAnalysis: Error: Data verification failed. There are Typescript projects without a linked npm package:${COLOR_DEFAULT}"
87-
echo -e "${COLOR_RED}${dataVerificationResult}${COLOR_DEFAULT}"
88-
exit 1
86+
# Warning: There are Typescript projects that are not linked to NPM Packages (unresolvedProjectsCount is greater than zero).
87+
# It is possible to have projects with a tsconfig.json file but without a package.json e.g. for testing purposes.
88+
echo -e "${COLOR_YELLOW}prepareAnalysis: Data verification warning: There are Typescript projects that are not linked to a npm package:${COLOR_DEFAULT}"
89+
echo -e "${COLOR_YELLOW}${dataVerificationResult}${COLOR_DEFAULT}"
90+
# Since this is now only a warning, execution will be continued.
8991
fi
9092
execute_cypher "${TYPESCRIPT_CYPHER_DIR}/Link_external_modules_to_corresponding_npm_dependency.cypher"
9193

0 commit comments

Comments
 (0)