From e0b49ea919cc69b9988c3b45432c0b8cd5c1901a Mon Sep 17 00:00:00 2001 From: gibber9809 Date: Sun, 7 Jan 2024 14:41:27 -0500 Subject: [PATCH] Address review comments --- components/core/tools/scripts/lib_install/mongoc.sh | 8 ++------ components/core/tools/scripts/lib_install/mongocxx.sh | 8 ++------ 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/components/core/tools/scripts/lib_install/mongoc.sh b/components/core/tools/scripts/lib_install/mongoc.sh index ed389d3cc..183fb8622 100755 --- a/components/core/tools/scripts/lib_install/mongoc.sh +++ b/components/core/tools/scripts/lib_install/mongoc.sh @@ -43,10 +43,10 @@ if [ $installed -eq 0 ] ; then fi echo "Checking for elevated privileges..." -privileged_command_prefix="" +install_command_prefix_args=() if [ ${EUID:-$(id -u)} -ne 0 ] ; then sudo echo "Script can elevate privileges." - privileged_command_prefix="sudo" + install_command_prefix_args=("sudo") fi # Download @@ -83,10 +83,6 @@ checkinstall_installed=$? set -e # Install -install_command_prefix_args=() -if ! [ -z "${privileged_command_prefix}" ]; then - install_command_prefix_args=(${privileged_command_prefix}) -fi if [ $checkinstall_installed -eq 0 ] ; then install_command_prefix_args+=( \ checkinstall \ diff --git a/components/core/tools/scripts/lib_install/mongocxx.sh b/components/core/tools/scripts/lib_install/mongocxx.sh index 25dbd3030..6cfbd0946 100755 --- a/components/core/tools/scripts/lib_install/mongocxx.sh +++ b/components/core/tools/scripts/lib_install/mongocxx.sh @@ -43,10 +43,10 @@ if [ $installed -eq 0 ] ; then fi echo "Checking for elevated privileges..." -privileged_command_prefix="" +install_command_prefix_args=() if [ ${EUID:-$(id -u)} -ne 0 ] ; then sudo echo "Script can elevate privileges." - privileged_command_prefix="sudo" + install_command_prefix_args=("sudo") fi # Download @@ -86,10 +86,6 @@ checkinstall_installed=$? set -e # Install -install_command_prefix_args=() -if ! [ -z "${privileged_command_prefix}" ]; then - install_command_prefix_args=(${privileged_command_prefix}) -fi if [ $checkinstall_installed -eq 0 ] ; then install_command_prefix_args+=( \ checkinstall \