diff --git a/src/scripts/darwin.sh b/src/scripts/darwin.sh index 80f2e642..83d3267c 100644 --- a/src/scripts/darwin.sh +++ b/src/scripts/darwin.sh @@ -19,7 +19,7 @@ add_log() { # Function to remove extensions remove_extension() { extension=$1 - sudo sed -i '' "/$extension/d" "$ini_file" + sudo sed -Ei '' "/=(.*\/)?\"?$extension/d" "$ini_file" sudo rm -rf "$scan_dir"/*"$extension"* >/dev/null 2>&1 sudo rm -rf "$ext_dir"/"$extension".so >/dev/null 2>&1 } diff --git a/src/scripts/linux.sh b/src/scripts/linux.sh index 15b78805..7cb6ca83 100644 --- a/src/scripts/linux.sh +++ b/src/scripts/linux.sh @@ -78,8 +78,8 @@ check_extension() { # Function to delete extensions delete_extension() { extension=$1 - sudo sed -i "/$extension/d" "$ini_file" - sudo sed -i "/$extension/d" "$pecl_file" + sudo sed -Ei "/=(.*\/)?\"?$extension/d" "$ini_file" + sudo sed -Ei "/=(.*\/)?\"?$extension/d" "$pecl_file" sudo rm -rf "$scan_dir"/*"$extension"* >/dev/null 2>&1 sudo rm -rf "$ext_dir"/"$extension".so >/dev/null 2>&1 }