Skip to content

Commit 5f190d2

Browse files
authored
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.
1 parent 1931e64 commit 5f190d2

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

Mac/BuildScript/scripts/postflight.documentation

+3-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@ SHARE_DOCDIR_TO_FWK="../../.."
1212
# make link in /Applications/Python m.n/ for Finder users
1313
if [ -d "${APPDIR}" ]; then
1414
ln -fhs "${FWK_DOCDIR}/index.html" "${APPDIR}/Python Documentation.html"
15-
open "${APPDIR}" || true # open the applications folder
15+
if [ "${COMMAND_LINE_INSTALL}" != 1 ]; then
16+
open "${APPDIR}" || true # open the applications folder
17+
fi
1618
fi
1719

1820
# make share/doc link in framework for command line users
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Avoid opening Finder window if running installer from the command line.
2+
Patch contributed by Rick Heil.

0 commit comments

Comments
 (0)