| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Instead, use `brew --prefix`. Allows stm32CubeProg.sh to detect gnu-getopt binary/PATH when Homebrew was installed in a non-default prefix. Signed-off-by: Andrew Yong <me@ndoo.sg>
Sorry, something went wrong.
There was a problem hiding this comment.
This PR replaces hardcoded Homebrew prefix paths with dynamic detection using brew --prefix, enabling the script to locate the gnu-getopt binary when Homebrew is installed in non-default locations.
Key Changes:
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Sorry, something went wrong.
|
Hi, not really. I am still seeing a regression when using macOS 15.6 getopt. Though, of course, functionally I am unblocked because the solution is just that STM32Tools 2.4.0 does not like macOS 15.6 built in getopt for me. Let me summarize on #112. |
Sorry, something went wrong.
|
Thanks. Anyway as stated by Copilot and after some search it semms the command is not always available by default. |
Sorry, something went wrong.
Yes, the command is only available if Homebrew is installed. Let me add a check that the command is available. |
Sorry, something went wrong.
- Check for `brew` before testing prefix - Restore previously hardcoded prefixes in case gnu-getopt was installed without Homebrew Signed-off-by: Andrew Yong <me@ndoo.sg>
|
Added a commit which addresses the error if Homebrew is not present but gnu-getopt was installed in one of the previously supported prefixes (which only Homebrew seems to use anyway, but this should cover all regressions). |
Sorry, something went wrong.
There was a problem hiding this comment.
Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Sorry, something went wrong.
|
For context, Homebrew is usually how gnu-getopt is installed (looking at previous issue #100). So I'm not sure if there is any point in hardcoding the paths, we should always use brew --prefix, the only other common way to install GNU getopt would be with MacPorts (but I’m not able to test that right now). |
Sorry, something went wrong.
Probably but what happe in brew command does not exist or failed to return prefix. |
Sorry, something went wrong.
This check should cover your concern
I have tested by renaming brew executable from brew to brew2 and this condition successfully fails (haha), resulting in moving on to the next conditions that test the previous hardcoded paths. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Summary
Instead, use brew --prefix.
This PR fixes/implements the following bugs/features
Validation
Code formatting
Closing issues
N/A