this post was submitted on 28 Jul 2024
593 points (93.9% liked)

Programmer Humor

19187 readers
1195 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 1 year ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 36 points 1 month ago* (last edited 1 month ago) (17 children)

You get admin privileges on MacOS like a big boy. You can use bash or zsh commands in Terminal all you want.

Cool. So try updating to a version of Bash from the last 15 years, because the pre-installed one is Bash 3, because Bash 4 and 5 are under the GPLv3 license, which Apple won't comply with.

...ah, no, you can't update the pre-installed Bash, because it's on a section of the file system that is read-only even with admin access. You can install Bash 5 as a separate shell, and use that as your default terminal shell, but any scripts written with the standard #!/bin/bash instead of the more flexible #!/usr/bin/env bash will still use Bash 3.

This "handholding" (or really, a safety net) is arguably a good thing, or at least a positive tradeoff; but you can't claim it doesn't exist.

[–] [email protected] 4 points 1 month ago (11 children)

I'm not sure what you mean. I have updated bash with a single homebrew command.

[–] [email protected] 1 points 1 month ago (4 children)

If it's anything like when I used a Mac regularly 7y ago, Homebrew doesn't install to /bin, it installs to /usr/local/bin, which only works for scripts that use env in their shell "marker" (if you don't call it directly with the shell). You're just putting a higher bash in the path, not truly updating the one that comes with the system.

[–] [email protected] 2 points 1 month ago (1 children)

That's mostly still true, with the small caveat that the default prefix on arm64 macOS is /opt/homebrew rather than /usr/local, so you might have to add it explicitly to your PATH

[–] [email protected] 1 points 1 month ago

Oh thank goodness, that was one of my main complaints with the system. Did they ever get around to requiring sudo like Macports (and any other reasonable system level packages manager on BSD/Linux)?

load more comments (2 replies)
load more comments (8 replies)
load more comments (13 replies)