From 38324c226eb850662c484b7aeede8f8feeb82bc8 Mon Sep 17 00:00:00 2001 From: William Wernert Date: Mon, 7 Dec 2020 10:58:58 -0500 Subject: [PATCH] [fix] Don't let grep output message on file not found --- setup/so-functions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup/so-functions b/setup/so-functions index e8360c671..daeb917a0 100755 --- a/setup/so-functions +++ b/setup/so-functions @@ -771,7 +771,7 @@ disable_auto_start() { logCmd "crontab -u $INSTALLUSERNAME -r" fi - if grep -q so-setup /home/$INSTALLUSERNAME/.bash_profile; then + if grep -s -q so-setup /home/$INSTALLUSERNAME/.bash_profile; then # Truncate last line of the bash profile info "Removing auto-run of setup from bash profile" sed -i '$ d' /home/$INSTALLUSERNAME/.bash_profile >> "$setup_log" 2>&1