Executable-finding fails when there are spaces in the file path

#1 · closed · 3 comments

View on GitHub ↗

kbongort

Hi, thanks for putting this script together! It's very handy. I found that when there are spaces in the path to the .app, the following loop iterates over each space-separated part rather than each executable path: ``` for executable in $(find "$bundlepath/Contents/MacOS" -type f -perm +111); do ... ``` I fixed this for myself with the technique from https://stackoverflow.com/a/63969005, and would be happy to put up a PR with that fix. But figured I'd report the issue and get an ack beforehand. Thanks!

Comments

imrehorvath

Hi, thanks for reporting this issue! Valid point as the path to an application bundle may contain spaces... I made some improvements, now it should handle spaces, wildcards and newlines too. Please check the main at HEAD. In case of any issue please report back. Thanks!

kbongort

Cool, thanks for the fix!

imrehorvath

Closing as no pending action.