From 12e8a0aea6b5841d212f9c9c19b61a60aa15b74c Mon Sep 17 00:00:00 2001 From: David Baumgold Date: Tue, 3 Oct 2023 00:12:52 +0200 Subject: [PATCH] Lowercase APPNAME on macOS Homebrew --- jupyter_core/paths.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/jupyter_core/paths.py b/jupyter_core/paths.py index 74c21dc..3fc1b8b 100644 --- a/jupyter_core/paths.py +++ b/jupyter_core/paths.py @@ -25,8 +25,13 @@ pjoin = os.path.join -# Capitalize Jupyter in paths only on Windows and MacOS -APPNAME = "Jupyter" if sys.platform in ("win32", "darwin") else "jupyter" +# Capitalize Jupyter in paths only on Windows and MacOS (when not in Homebrew) +if sys.platform == "win32" or ( + sys.platform == "darwin" and not sys.prefix.startswith("/opt/homebrew") +): + APPNAME = "Jupyter" +else: + APPNAME = "jupyter" # UF_HIDDEN is a stat flag not defined in the stat module. # It is used by BSD to indicate hidden files.