From 8bac0d5de1a30f2468f4afb950281cdce188595e Mon Sep 17 00:00:00 2001 From: sergei-pyshnoi <121864472+sergei-pyshnoi@users.noreply.github.com> Date: Tue, 9 May 2023 19:41:47 +0200 Subject: [PATCH] [macOS] fix edge installation (#7553) --- images/macos/provision/core/edge.sh | 41 +++++++++++++++-------------- 1 file changed, 21 insertions(+), 20 deletions(-) diff --git a/images/macos/provision/core/edge.sh b/images/macos/provision/core/edge.sh index 6eaecbc8a..388c6dbf5 100644 --- a/images/macos/provision/core/edge.sh +++ b/images/macos/provision/core/edge.sh @@ -35,27 +35,28 @@ ln -s "$EDGEDRIVER_BIN" $APPLICATION echo "export EDGEWEBDRIVER=${EDGEDRIVER_DIR}" >> "${HOME}/.bashrc" popd > /dev/null -#Delete Microsoft autoupdate service to prevent autoupdates popup -AUTOUPDATE_START="$HOME/Library/Preferences/com.microsoft.autoupdate2.plist" -while [ ! -f "$AUTOUPDATE_START" ] -do - echo "Wait for MS update automatic installation" - sleep 30 -done +# Configure Edge Updater to prevent auto update +# https://learn.microsoft.com/en-us/deployedge/edge-learnmore-edgeupdater-for-macos -echo "kill autoupdate process" -pgrep [M]icrosoft | sudo xargs kill -9 || true -echo "remove autupdate service" -sudo launchctl remove com.microsoft.autoupdate.helper +mkdir "Library/Managed Preferences" -echo "delete autoupdate files" -sudo rm -rf "$HOME/Library/Application Support/Microsoft AU Daemon/" -sudo rm -rf "$HOME/Library/Application Support/Microsoft AutoUpdate/" -sudo rm -rf "$HOME/Library/Preferences/com.microsoft.autoupdate2.plist" -sudo rm -rf "$HOME/Library/Preferences/com.microsoft.autoupdate.fba.plist" -sudo rm -rf "$HOME/Library/Caches/com.microsoft.autoupdate2" -sudo rm -rf "/Library/Application Support/Microsoft/MAU2.0/" -sudo rm -rf "/Library/LaunchAgents/com.microsoft.update.agent.plist" -sudo rm -rf "/Library/PrivelegedHelperTools/com.microsoft.autoupdate.helper" +cat < "Library/Managed Preferences/com.microsoft.EdgeUpdater.plist" + + + + + updatePolicies + + global + + UpdateDefault + 3 + + + + +EOF + +chown root:wheel "/Library/Managed Preferences/com.microsoft.EdgeUpdater.plist" invoke_tests "Browsers" "Edge"