feat core
: Additional error validation on custom navigation routes
This commit is contained in:
parent
8115d1c603
commit
13bc8e2cf0
1 changed files with 10 additions and 0 deletions
10
blueprint.sh
10
blueprint.sh
|
@ -773,6 +773,16 @@ if [[ ( $2 == "-i" ) || ( $2 == "-install" ) ]]; then VCMD="y"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Validate file path.
|
||||||
|
if [[ ! -f ".blueprint/tmp/$n/$dashboard_components/${COMPONENTS_ROUTE_COMP}.tsx" ]] &&
|
||||||
|
[[ ! -f ".blueprint/tmp/$n/$dashboard_components/${COMPONENTS_ROUTE_COMP}.ts" ]] &&
|
||||||
|
[[ ! -f ".blueprint/tmp/$n/$dashboard_components/${COMPONENTS_ROUTE_COMP}.jsx" ]] &&
|
||||||
|
[[ ! -f ".blueprint/tmp/$n/$dashboard_components/${COMPONENTS_ROUTE_COMP}.js" ]]; then
|
||||||
|
rm -R ".blueprint/tmp/$n"
|
||||||
|
PRINT FATAL "Navigation route configuration points towards one or more components that do not exist."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
# Return error if identifier is generated incorrectly.
|
# Return error if identifier is generated incorrectly.
|
||||||
if [[ $COMPONENTS_ROUTE_IDEN == "" ]]; then
|
if [[ $COMPONENTS_ROUTE_IDEN == "" ]]; then
|
||||||
rm -R ".blueprint/tmp/$n"
|
rm -R ".blueprint/tmp/$n"
|
||||||
|
|
Loading…
Reference in a new issue