fix(core): fatal error when trying to install extensions with no export/install/remove scripts

This commit is contained in:
prplwtf 2023-12-11 20:05:29 +01:00
parent 820c14a2f1
commit 57e356205b

View file

@ -557,7 +557,7 @@ if [[ ( $2 == "-i" ) || ( $2 == "-install" ) ]]; then VCMD="y"
fi fi
# Validate custom script paths. # Validate custom script paths.
if [[ $F_hasInstallScript || $F_hasRemovalScript || $F_hasExportScript ]]; then if [[ $F_hasInstallScript == true || $F_hasRemovalScript == true || $F_hasExportScript == true ]]; then
if [[ $data_directory == "" ]]; then rm -R ".blueprint/tmp/$n"; throw 'scriptsNoDataDir'; fi if [[ $data_directory == "" ]]; then rm -R ".blueprint/tmp/$n"; throw 'scriptsNoDataDir'; fi
if [[ $F_hasInstallScript == true ]] && [[ ! -f ".blueprint/tmp/$n/$data_directory/install.sh" ]] || if [[ $F_hasInstallScript == true ]] && [[ ! -f ".blueprint/tmp/$n/$data_directory/install.sh" ]] ||