From da37bfaba909aa00f9dbaeca54038fe881dc28e3 Mon Sep 17 00:00:00 2001 From: anmol Date: Thu, 22 Nov 2018 01:44:32 +0530 Subject: [PATCH] Check if rust exits before removing it --- scripts/remove | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/scripts/remove b/scripts/remove index aae71f3..cacc8de 100755 --- a/scripts/remove +++ b/scripts/remove @@ -47,10 +47,13 @@ fi # Remove metapackage and its dependencies ynh_remove_app_dependencies - +export PATH="$PATH:/var/www/$app/.cargo/bin:/var/$app/.local/bin:/usr/local/sbin" +export FEATURES=postgres ( cd $final_path/$app && sudo -u "$app" cargo uninstall diesel_cli ) -sudo /usr/local/lib/rustlib/uninstall.sh +if [ -d "/usr/local/lib/rustlib" ]; then + sudo /usr/local/lib/rustlib/uninstall.sh +fi #================================================= # REMOVE APP MAIN DIR