Prechádzať zdrojové kódy

small fix

Error displayed when update process fails.
Cristhian Martínez Ochoa 2 rokov pred
rodič
commit
feb642d0e1
1 zmenil súbory, kde vykonal 2 pridanie a 1 odobranie
  1. 2 1
      lib/webin

+ 2 - 1
lib/webin

@@ -374,7 +374,8 @@ webinoly_update() {
 	if [[ $? == 0 ]]; then
 		echo "${gre}Webinoly App has been updated successfully!${dim} (Updated to: v$(conf_read app-version))${end}"
 	else
-		sudo rm weby
+		# Check if exist, because it can be deleted before if an error is triggered in the installer, for instance.
+		[[ -f weby ]] && sudo rm weby
 		echo "${red}[ERROR] Update process has failed!${end}"
 		exit 1
 	fi