Skip to content

Commit

Permalink
Merge pull request SCons#4603 from al3xtjames/darwin-generate
Browse files Browse the repository at this point in the history
Handle permission errors while generating paths on Darwin
  • Loading branch information
bdbaddog authored Sep 23, 2024
2 parents 5404eb7 + 2d5e3a4 commit 4af2538
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
5 changes: 5 additions & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 4 additions & 0 deletions RELEASE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
------------

Expand Down
2 changes: 1 addition & 1 deletion SCons/Platform/darwin.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 4af2538

Please sign in to comment.