Hardcode path to dirname on macOS
Hardcode path to dirname on macOS

It seems that some repos have customized PATH so this isn't available.
This should fix that.

Closes #10222.

PiperOrigin-RevId: 280180002

dslomov/bazel,dslomov/bazel,cushon/bazel,safarmer/bazel,davidzchen/bazel,akira-baruah/bazel,cushon/bazel,safarmer/bazel,bazelbuild/bazel,ButterflyNetwork/bazel,davidzchen/bazel,dslomov/bazel-windows,katre/bazel,perezd/bazel,katre/bazel,safarmer/bazel,safarmer/bazel,cushon/bazel,dslomov/bazel,twitter-forks/bazel,perezd/bazel,meteorcloudy/bazel,katre/bazel,bazelbuild/bazel,dslomov/bazel,ButterflyNetwork/bazel,katre/bazel,akira-baruah/bazel,perezd/bazel,dslomov/bazel,akira-baruah/bazel,ulfjack/bazel,werkt/bazel,werkt/bazel,meteorcloudy/bazel,davidzchen/bazel,meteorcloudy/bazel,werkt/bazel,cushon/bazel,cushon/bazel,dslomov/bazel,dslomov/bazel-windows,bazelbuild/bazel,twitter-forks/bazel,dslomov/bazel-windows,twitter-forks/bazel,perezd/bazel,meteorcloudy/bazel,ButterflyNetwork/bazel,dslomov/bazel-windows,akira-baruah/bazel,bazelbuild/bazel,ulfjack/bazel,meteorcloudy/bazel,twitter-forks/bazel,davidzchen/bazel,dslomov/bazel,cushon/bazel,perezd/bazel,werkt/bazel,davidzchen/bazel,meteorcloudy/bazel,akira-baruah/bazel,dslomov/bazel-windows,davidzchen/bazel,katre/bazel,safarmer/bazel,twitter-forks/bazel,dslomov/bazel-windows,bazelbuild/bazel,twitter-forks/bazel,twitter-forks/bazel,safarmer/bazel,bazelbuild/bazel,ButterflyNetwork/bazel,ulfjack/bazel,ulfjack/bazel,ulfjack/bazel,ulfjack/bazel,ButterflyNetwork/bazel,perezd/bazel,ButterflyNetwork/bazel,perezd/bazel,akira-baruah/bazel,katre/bazel,werkt/bazel,davidzchen/bazel,meteorcloudy/bazel,ulfjack/bazel,werkt/bazel