From 4f58db256e13cd570571ca60b223b701aa57813b Mon Sep 17 00:00:00 2001 From: TheOnePath Date: Thu, 17 Feb 2022 23:27:03 +0000 Subject: [PATCH] Ammended bug fix The bug fix in commit 9ff1b6e has been re-addressed due to a potential edge case to cause another bug to occur as a result. This fix was implemented as a result from the review on PR: https://git.closedless.xyz/ClosedLess/Microsoft-Edge-Updater/pulls/1#issuecomment-8 --- msedge-updater | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/msedge-updater b/msedge-updater index f8c68f3..0f16ad5 100755 --- a/msedge-updater +++ b/msedge-updater @@ -302,8 +302,8 @@ log "DEBUG" "There is a more recent release of Microsoft Edge ($edge_channel) av [[ ! $quiet -eq 0 ]] && >&2 echo "Identified a new release of Microsoft Edge ($edge_channel) [Current: v$current_version. New: v$release_version]. Starting the download and installation process..." ## check if msedge process is already running -is_running=$(ps -aux | grep -oc "msedge-$edge_channel") -if [[ $is_running -gt 1 ]] ; then +is_running="$(pidof msedge | xargs ps -ocmd -p | grep -m1 "msedge-$edge_channel")" +if [[ ! -z "$is_running" ]] ; then log "DEBUG" "Identified running processes for msedge. Determining how script should handle process..." "$log_file" if [[ ! $yes_flag -eq 0 ]] ; then echo -n "Microsoft Edge ($edge_channel) is already open. To continue update, the browser must be closed. Are you sure you wish to proceed? [(Y)es/No]: " && read -n 1 choice ; echo