From d2cf13a9aeb148499e3cdd8cda424f8126b82e37 Mon Sep 17 00:00:00 2001 From: elreydetoda Date: Sat, 16 May 2020 12:36:13 -0400 Subject: [PATCH] optimizing check_forked check if -u is supported Signed-off-by: alex --- install.sh | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/install.sh b/install.sh index c391b033..50d1eaeb 100644 --- a/install.sh +++ b/install.sh @@ -161,13 +161,7 @@ check_forked() { # Check for lsb_release command existence, it usually exists in forked distros if command_exists lsb_release; then # Check if the `-u` option is supported - set +e - lsb_release -a -u > /dev/null 2>&1 - lsb_release_exit_code=$? - set -e - - # Check if the command has exited successfully, it means we're in a forked distro - if [ "$lsb_release_exit_code" = "0" ]; then + if lsb_release -a -u > /dev/null 2>&1 ; then # Print info about current distro cat <<-EOF You're using '$lsb_dist' version '$dist_version'.