summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilliam Deegan <bill@baddogconsulting.com>2024-09-23 21:00:58 (GMT)
committerGitHub <noreply@github.com>2024-09-23 21:00:58 (GMT)
commit4af253800fbb03751e1b4537f1362a09dcfeef8a (patch)
treeed4764fd14daa45aeefcc0e028cde969d7dc50dc
parent5404eb70cc02bd5697b0274e5632be41436737f8 (diff)
parent2d5e3a40a613225b329776ab9dbd9abcd2d24222 (diff)
downloadSCons-4af253800fbb03751e1b4537f1362a09dcfeef8a.zip
SCons-4af253800fbb03751e1b4537f1362a09dcfeef8a.tar.gz
SCons-4af253800fbb03751e1b4537f1362a09dcfeef8a.tar.bz2
Merge pull request #4603 from al3xtjames/darwin-generate
Handle permission errors while generating paths on Darwin
-rw-r--r--CHANGES.txt5
-rw-r--r--RELEASE.txt4
-rw-r--r--SCons/Platform/darwin.py2
3 files changed, 10 insertions, 1 deletions
diff --git a/CHANGES.txt b/CHANGES.txt
index b402b16..e9f445d 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -50,6 +50,11 @@ RELEASE VERSION/DATE TO BE FILLED IN LATER
- Some manpage cleanup for the gettext and pdf/ps builders.
- Some clarifications in the User Guide "Environments" chapter.
+ From Alex James:
+ - On Darwin, PermissionErrors are now handled while trying to access
+ /etc/paths.d. This may occur if SCons is invoked in a sandboxed
+ environment (such as Nix).
+
RELEASE 4.8.1 - Tue, 03 Sep 2024 17:22:20 -0700
diff --git a/RELEASE.txt b/RELEASE.txt
index 06a726e..1ccc056 100644
--- a/RELEASE.txt
+++ b/RELEASE.txt
@@ -46,6 +46,10 @@ FIXES
- Fix a problem with compilation_db component initialization - the
entries for assembler files were not being set up correctly.
+- On Darwin, PermissionErrors are now handled while trying to access
+ /etc/paths.d. This may occur if SCons is invoked in a sandboxed environment
+ (such as Nix).
+
IMPROVEMENTS
------------
diff --git a/SCons/Platform/darwin.py b/SCons/Platform/darwin.py
index 381b542..4ab7466 100644
--- a/SCons/Platform/darwin.py
+++ b/SCons/Platform/darwin.py
@@ -46,7 +46,7 @@ def generate(env) -> None:
# make sure this works on Macs with Tiger or earlier
try:
dirlist = os.listdir('/etc/paths.d')
- except FileNotFoundError:
+ except (FileNotFoundError, PermissionError):
dirlist = []
for file in dirlist: