-
Notifications
You must be signed in to change notification settings - Fork 24.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use readlink instead of realpath in packager.sh #34145
Conversation
Summary: Changelog: [Internal] Generated with: ``` python3 codemod.py -d xplat/js --extensions=sh 'THIS_DIR=\$\(cd -P "\$\(dirname "\$\(readlink "\${BASH_SOURCE\[0\]}"' 'THIS_DIR=$(cd -P "$(dirname "$(realpath "${BASH_SOURCE[0]}"'``` Reviewed By: motiz88 Differential Revision: D34379955 fbshipit-source-id: c60521cd6508b203f48ca8c890c450319991c2d4
Base commit: b66db7a |
Base commit: b66db7a |
@philIip has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
Thanks for sending this over @dminkovsky
Do you have a reference? I'm on 12.3 and I effectively have it. I'm wondering why this got removed in 12.3. Also there are other usages of |
Hey thanks for taking a look at this @cortinico. My only reference for 12.4 is that I'm running it, and the other reporter on the breaking commit said they were running 12.2. So, I have no idea about 12.3, but In general, though, I find this issue a bit confusing because the breaking commit (bb8ddd6) is from February 22nd, quite some time ago. Why did this only surface now? What motivated bb8ddd6? Maybe this https://stackoverflow.com/questions/3572030/bash-script-absolute-path-with-os-x? |
Maybe just make |
Happy to provide a bit more context here. (Also cc @IanChilds as the original author). It seems like our internal Buck setup needed to use I think we should be fine by either:
FYI, I'm on 12.3.1 and I do have |
I can confirm that realpath is not available per default on macOS 12.4 |
@dminkovsky Could you rebase? |
Sure @cortinico, will be at a computer in a couple hours will let you know. |
@cortinico I rebased |
(Tried renaming my branch, which didn't go as intended) |
@cortinico has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
This pull request was successfully merged by @dminkovsky in 698b147. When will my fix make it into a release? | Upcoming Releases |
Following up here: we decided to merge this as this usage of |
Summary
realpath
is not available on macOS 12.2 and 12.4. Because of this, the following error is shown when launching an RN app with XCode (which callspackager.sh
vialaunchPackage.command
):I am running Bash 5 but realpath is also not available with zsh.
This issue was introduced in bb8ddd6#diff-6ca7c99209bdf630550bb9e2946ce8611948c5a23b32ffb25028792ef5d48b8d, which interestingly did not change
launchPackage.command
. There's a recent comment on that commit that confirms this issue:bb8ddd6#commitcomment-77818917
Changelog
[iOS] [Fixed] - Use readlink instead of realpath in packager.sh
Test Plan