Open bchatard opened 1 year ago
In Toolbox v2, script is changed but replaced just one word from 'ideaargs' to 'intellij_args'
#!/bin/bash
#Generated by JetBrains Toolbox 1.28.1.15219
declare -a ideargs=() declare -- wait=""
for o in "$@"; do if [[ "$o" = "--wait" || "$o" = "-w" ]]; then wait="-W" o="--wait" fi if [[ "$o" =~ " " ]]; then ideargs+=("\"$o\"") else ideargs+=("$o") fi done
open -na "~~" $wait --args "${ideargs[@]}"
- Toolbox v2 script
```bash
#!/bin/bash
#Generated by JetBrains Toolbox 2.0.2.16660
declare -a intellij_args=()
declare -- wait=""
for o in "$@"; do
if [[ "$o" = "--wait" || "$o" = "-w" ]]; then
wait="-W"
o="--wait"
fi
if [[ "$o" =~ " " ]]; then
intellij_args+=("\"$o\"")
else
intellij_args+=("$o")
fi
done
open -na "~~" $wait --args "${intellij_args[@]}"
So I just fix findProduct.js (in alfred-jetbrains v1.9.7) and solved error
// Toolbox case
const patternV1 = new RegExp(
'open\\s-(n)?a\\s"(.*)"(?:\\s\\$wait)?(\\s--args)\\s"\\$(?:{ideargs\\[)?@(?:]})?"'
);
const patternV2 = new RegExp(
'open\\s-(n)?a\\s"(.*)"(?:\\s\\$wait)?(\\s--args)\\s"\\$(?:{intellij_args\\[)?@(?:]})?"'
);
const matchV1 = patternV1.exec(binContent);
const match = matchV1 ? matchV1 : patternV2.exec(binContent);
const matchLength = match ? match.length : 0;
In alred-jetbrains v2.0.7, Intellij Ultimate and WebStrom is fine. but pycharm Professional throw error..
hi, v1 (JS based) is no more supported
about you last comment, please provide log file (enable debug in Alfred)
thank you for your reply
below is my log file (alfred_jetbrains_cli_2023-09-05.log) I deleted some lines that seemed irrelevant.
10:28:03.597 (+0:00:00.000529)
Search projects for PyCharmProfessional with filter ''
10:28:03.597 (+0:00:00.000592)
Locate Settings Directory for pyCharmProfessional
10:28:03.597 (+0:00:00.000632)
Custom Config: {}
10:28:03.597 (+0:00:00.000739)
Search in [~/Library/Application Support/Google, ~/Library/Application Support/JetBrains, ~/Library/Preferences]
10:28:03.597 (+0:00:00.000755)
Looking in Directory: '/Users/user/Library/Application Support/Google'
10:28:03.597 (+0:00:00.000889)
Application Support: /Users/user/Library/Application Support/Google/PyCharm
10:28:03.597 (+0:00:00.001270)
Looking in Directory: '/Users/user/Library/Application Support/JetBrains'
10:28:03.597 (+0:00:00.001290)
Application Support: /Users/user/Library/Application Support/JetBrains/PyCharm
10:28:03.599 (+0:00:00.002773)
Settings Paths: [Directory: '/Users/user/Library/Application Support/JetBrains/PyCharm2023.1']
10:28:03.599 (+0:00:00.002785)
Use Directory: '/Users/user/Library/Application Support/JetBrains/PyCharm2023.1'
10:28:03.599 (+0:00:00.002824)
Use recentProjects.xml
10:28:03.603 (+0:00:00.007249)
Locate Application for PyCharmProfessional
10:28:03.603 (+0:00:00.007267)
Search in [/Applications, ~/Applications, ~/Applications/JetBrains Toolbox]
10:28:03.603 (+0:00:00.007275)
Search applications [PyCharm, PyCharm Professional, PyCharm Professional, PyCharm Professional Edition]
10:28:03.603 (+0:00:00.007282)
Looking in Directory: '/Applications'
...
10:28:03.604 (+0:00:00.007818)
Check application Alfred 5
10:28:03.604 (+0:00:00.007830)
Check application JetBrains Toolbox
10:28:03.604 (+0:00:00.007871)
Looking in Directory: '/Users/user/Applications'
10:28:03.604 (+0:00:00.007971)
Check application CLion 2023.2.1
10:28:03.604 (+0:00:00.007980)
Check application .DS_Store
10:28:03.604 (+0:00:00.007987)
Check application Chrome Apps
10:28:03.604 (+0:00:00.007991)
Check application Fleet
10:28:03.604 (+0:00:00.007998)
Check application IntelliJ IDEA Ultimate
10:28:03.604 (+0:00:00.008004)
Check application PyCharm Professional
10:28:03.604 (+0:00:00.008010)
Check application WebStorm
10:28:03.604 (+0:00:00.008017)
Check application MPS
10:28:03.604 (+0:00:00.008023)
Check application DataGrip
10:28:03.604 (+0:00:00.008029)
Check application CLion
10:28:03.604 (+0:00:00.008036)
Looking in Directory: '/Users/user/Applications/JetBrains Toolbox'
10:28:03.604 (+0:00:00.008046)
Directory: '/Users/user/Applications/JetBrains Toolbox' doesn't exists
10:28:03.604 (+0:00:00.008052)
Can't locate application for pyCharmProfessional
sorry I forgot this issue.
I can't reproduce your case and it's weird we see an application "PyCharm Professional" in your Applications folder. No clue on this, sorry
I'll try to put more log on next release
Hi, I've encountered the same issue with PyCharm Professional Edition. And I verified that the binary exists in the ~/Applications path.
TODO: check if any issue with this version