bpo-39580: add check for CLI installation on macOS

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.
This commit is contained in:
Ned Deily 2020-06-17 03:18:55 -04:00
parent 9f4eec081b
commit 966036af0e
No known key found for this signature in database
GPG Key ID: 2D347EA6AA65421D
2 changed files with 4 additions and 1 deletions

View File

@ -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

View File

@ -0,0 +1 @@
Avoid opening Finder window if running installer from the command line.