Closed marcorieser closed 3 years ago
Thanks - this affected me for idea, too. I've made a different modification locally to fix it - I just removed the args part. EDIT: nope - needed more changes. MB. removed:
const pattern = new RegExp('open -(n)?a "(.*)"( --args)? "\\$@"');
const match = pattern.exec(binContent);
const matchLength = match ? match.length : 0;
if (match && [2, 4].includes(matchLength)) {
replaced with:
const pattern = new RegExp('open -(n)?a "(.*)"');
const match = pattern.exec(binContent);
const matchLength = match ? match.length : 0;
if (match && [2, 3].includes(matchLength)) {
This should work with the latest toolbox, and also the previous versions this regex supported. :-)
I have no old shell scripts available to test if my solution works with them. I just found an old shell script in another issue and made sure my regex catches this and my new shell script. Also did not really go trough the match logic below the regex to see which groups / parts are needed, just made sure the groups are the same as before. 😊
Thanks @bchatard . Pulled the new code and everything is working perfectly. Cheers!
Oh, and thanks, obviously, to @marcorieser , too!
Describe the bug The latest Toolbox changes the structure of the shell script from
open -na "/PATH/TO/APPS/DIRECTORY/PhpStorm.app/Contents/MacOS/phpstorm" --args "$@"
toopen -na "/PATH/TO/APPS/DIRECTORY/PhpStorm.app/Contents/MacOS/phpstorm" $wait --args "${ideargs[@]}"
Because the current regular expression doesn't match with the new pattern, the path can not be found.To Reproduce
Expected behavior A list of the last opened projects from PhpStorm.
node --version
)npm --version
)