GoogleCloudPlatform / bank-of-anthos

Retail banking sample application showcasing Kubernetes and Google Cloud
https://cymbal-bank.fsi.cymbal.dev
Apache License 2.0
1.01k stars 593 forks source link

realpath -s not supported on MacOS Sequoia #2238

Closed rcastley closed 2 weeks ago

rcastley commented 1 month ago

Please check the open issues for this repository to verify that the same issue/bug has not been already reported.

If you see the bug being already reported, please upvote and comment on the existing issue instead of opening a new one. If you notice a bug/issue which is not the same as yours but is related, create a new one and link to the existing bug/issue.

Describe the bug

make-release.sh using realpath -s which is not supported on MacOS Sequoia.

To Reproduce

Run the make-release.sh script on MacOS Sequoia

Suggested Fix

Replace:

SCRIPT_DIR=$(dirname $(realpath -s $0))

with

SCRIPT_PATH=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/$(basename "${BASH_SOURCE[0]}")
SCRIPT_DIR="$(dirname $SCRIPT_PATH)"

Environment

MacOS Sequoia

glasnt commented 4 weeks ago

Can you confirm the output of which realpath? I've updated my machine to Sequoia (but haven't updated Xcode), so I'm currently able to use realpath.

$ which realpath
/bin/realpath
bourgeoisor commented 2 weeks ago

I'm noticing the -s is gone from Sonona as well (or at least it is on my ARM machine -- Maybe it's an ARM thing?)

It was a superfluous flag only for a very edge case that the majority of people shouldn't encounter anyway, so I just removed it here: https://github.com/GoogleCloudPlatform/bank-of-anthos/pull/2256