bpo-39580: add check for CLI installation on macOS (GH-20271)

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.
(cherry picked from commit 5f190d2cc6)

Co-authored-by: Rick Heil <rickheil@partnersandsimons.com>
This commit is contained in:
Miss Islington (bot) 2020-06-25 03:56:14 -07:00 committed by GitHub
parent 8127daba89
commit 4564ebb1e6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View File

@ -12,7 +12,9 @@ SHARE_DOCDIR_TO_FWK="../../.."
# make link in /Applications/Python m.n/ for Finder users # make link in /Applications/Python m.n/ for Finder users
if [ -d "${APPDIR}" ]; then if [ -d "${APPDIR}" ]; then
ln -fhs "${FWK_DOCDIR}/index.html" "${APPDIR}/Python Documentation.html" ln -fhs "${FWK_DOCDIR}/index.html" "${APPDIR}/Python Documentation.html"
if [ "${COMMAND_LINE_INSTALL}" != 1 ]; then
open "${APPDIR}" || true # open the applications folder open "${APPDIR}" || true # open the applications folder
fi
fi fi
# make share/doc link in framework for command line users # make share/doc link in framework for command line users

View File

@ -0,0 +1,2 @@
Avoid opening Finder window if running installer from the command line.
Patch contributed by Rick Heil.