]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-39580: add check for CLI installation on macOS (GH-20271)
authorRick Heil <rickheil@partnersandsimons.com>
Thu, 25 Jun 2020 10:37:40 +0000 (06:37 -0400)
committerGitHub <noreply@github.com>
Thu, 25 Jun 2020 10:37:40 +0000 (06:37 -0400)
Adds a simple check for whether or not the package is being installed in the GUI or using installer on the command line. This addresses an issue where CLI-based software management tools (such as Munki) unexpectedly open Finder windows into a GUI session during installation runs.

Mac/BuildScript/scripts/postflight.documentation
Misc/NEWS.d/next/macOS/2020-06-25-06-09-00.bpo-39580.N_vJ9h.rst [new file with mode: 0644]

index 3cbbc1bf10ca2a5af343fd62be3987a4aef95d39..ec48599cba76e1262d91baa5c9c39f7ae228b71e 100755 (executable)
@@ -12,7 +12,9 @@ SHARE_DOCDIR_TO_FWK="../../.."
 # make link in /Applications/Python m.n/ for Finder users
 if [ -d "${APPDIR}" ]; then
     ln -fhs "${FWK_DOCDIR}/index.html" "${APPDIR}/Python Documentation.html"
-    open "${APPDIR}" || true  # open the applications folder
+    if [ "${COMMAND_LINE_INSTALL}" != 1 ]; then
+        open "${APPDIR}" || true  # open the applications folder
+    fi
 fi
 
 # make share/doc link in framework for command line users
diff --git a/Misc/NEWS.d/next/macOS/2020-06-25-06-09-00.bpo-39580.N_vJ9h.rst b/Misc/NEWS.d/next/macOS/2020-06-25-06-09-00.bpo-39580.N_vJ9h.rst
new file mode 100644 (file)
index 0000000..95d6535
--- /dev/null
@@ -0,0 +1,2 @@
+Avoid opening Finder window if running installer from the command line.
+Patch contributed by Rick Heil.