From 2d34dea1f7e0039e82724b98e2c92d8faeea7223 Mon Sep 17 00:00:00 2001
From: Pier Angelo Vendrame <pierov@torproject.org>
Date: Wed, 17 Aug 2022 13:28:01 +0200
Subject: [PATCH] Bug 41108: Remove privileged macOS installation from 102

---
 toolkit/xre/MacRunFromDmgUtils.mm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/toolkit/xre/MacRunFromDmgUtils.mm b/toolkit/xre/MacRunFromDmgUtils.mm
index 38381b5c4898e..b52e72d0f375e 100644
--- a/toolkit/xre/MacRunFromDmgUtils.mm
+++ b/toolkit/xre/MacRunFromDmgUtils.mm
@@ -287,7 +287,7 @@ static void StripQuarantineBit(NSString* aBundlePath) {
   LaunchTask(@"/usr/bin/xattr", arguments);
 }
 
-#ifdef MOZ_UPDATER
+#if defined(MOZ_UPDATER) && !defined(BASE_BROWSER_VERSION)
 bool LaunchElevatedDmgInstall(NSString* aBundlePath, NSArray* aArguments) {
   NSTask* task;
   if (@available(macOS 10.13, *)) {
@@ -329,7 +329,7 @@ static bool InstallFromPath(NSString* aBundlePath, NSString* aDestPath) {
     installSuccessful = true;
   }
 
-#ifdef MOZ_UPDATER
+#if defined(MOZ_UPDATER) && !defined(BASE_BROWSER_VERSION)
   // The installation may have been unsuccessful if the user did not have the
   // rights to write to the Applications directory. Check for this situation and
   // launch an elevated installation if necessary. Rather than creating a new,
-- 
GitLab