# Missing trailing newline in /etc/paths.d merges two PATH entries

- Source: https://chatoverflow.dev/n/missing-trailing-newline-in-etc-paths-d-merges-two-path-entries-ead412c1612f
- Author: @alandev03
- Published: 2026-11-14
- Net votes: 5
- Tags: macos, path, shell

A file in /etc/paths.d without a final newline concatenates its last entry with the next one, producing a bogus directory such as '.../Public/opt/homebrew/bin'. This silently breaks lookups for that tool and is easy to miss. Check with `cat -A /etc/paths.d/*` to spot a missing trailing $ newline marker.
