bchatard / alfred-jetbrains

Alfred5 workflow to easily open your projects with your favorite JetBrains product.
MIT License
624 stars 49 forks source link

Can't find application path for IntellijIdea. after update toolbox 2.0.2 #332

Closed cafefarm-johnny closed 1 year ago

cafefarm-johnny commented 1 year ago

FAQ

Describe the bug

I can't use workflow when i after update Toolbox 2.0.2.16660 and migrated tools. It can not find project when typo in Alfred spotlight with message. "Error: Can't find application path for IntellijIdea."

this is workflow debug log.

[17:26:16.510] JetBrains - Open Project - v3[[Script Filter](alfredpreferences:workflows%3Eworkflow%3E@bchatard-alfred-jetbrains%3E141026F3-CC2E-4808-BF5B-BC24CCA41438)] Queuing argument 'prov'
[17:26:16.969] JetBrains - Open Project - v3[[Script Filter](alfredpreferences:workflows%3Eworkflow%3E@bchatard-alfred-jetbrains%3E141026F3-CC2E-4808-BF5B-BC24CCA41438)] Script with argv 'prov' finished
[17:26:16.969] JetBrains - Open Project - v3[[Script Filter](alfredpreferences:workflows%3Eworkflow%3E@bchatard-alfred-jetbrains%3E141026F3-CC2E-4808-BF5B-BC24CCA41438)] {
    "items": [
        {
            "title": "Error: Can't find application path for IntelliJIdea.",
            "subtitle": "Press ⌘L to see the full error and ⌘C to copy it.",
            "valid": false,
            "text": {
                "copy": "```\nError: Can't find application path for IntelliJIdea.\n    at getApplicationPath (file:///Users/johnnyuhm/Library/Application%20Support/Alfred/Alfred.alfredpreferences/workflows/@bchatard-alfred-jetbrains/src/findProduct.js:156:9)\n    at findProduct (file:///Users/johnnyuhm/Library/Application%20Support/Alfred/Alfred.alfredpreferences/workflows/@bchatard-alfred-jetbrains/src/findProduct.js:166:31)\n    at file:///Users/johnnyuhm/Library/Application%20Support/Alfred/Alfred.alfredpreferences/workflows/@bchatard-alfred-jetbrains/src/index.js:16:17\n    at async Promise.all (index 0)\n```\n\n-\nJetBrains - Open Project - v3 1.7.1\nAlfred 4.8\ndarwin 22.2.0",
                "largetype": "Error: Can't find application path for IntelliJIdea.\n    at getApplicationPath (file:///Users/johnnyuhm/Library/Application%20Support/Alfred/Alfred.alfredpreferences/workflows/@bchatard-alfred-jetbrains/src/findProduct.js:156:9)\n    at findProduct (file:///Users/johnnyuhm/Library/Application%20Support/Alfred/Alfred.alfredpreferences/workflows/@bchatard-alfred-jetbrains/src/findProduct.js:166:31)\n    at file:///Users/johnnyuhm/Library/Application%20Support/Alfred/Alfred.alfredpreferences/workflows/@bchatard-alfred-jetbrains/src/index.js:16:17\n    at async Promise.all (index 0)"
            },
            "icon": {
                "path": "/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/AlertStopIcon.icns"
            }
        }
    ]
}

this is which idea output.

❯ cat $(which idea)
#!/bin/bash
#Generated by JetBrains Toolbox 2.0.2.16660 at 2023-08-22T10:24:10.518457

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 "/Users/johnnyuhm/Applications/IntelliJ IDEA Ultimate.app/Contents/MacOS/idea" $wait --args "${intellij_args[@]}"% 

thank you for provide cool program. 😁👍

To Reproduce

  1. Toolbox Update 2.0.2.16660.
  2. Migrate tools. (Intellij Idea Ultimate, Android Studio)
  3. execute Alfred spotlight
  4. typo idea <project> or studio <project>
  5. can't find project.

Expected behavior

No response

Alfred Version

4.8

Workflow Version

1.7.1

Node Version

18.11.0

NPM Version

9.8.1

Jetbrains Product & Version

Intellij Idea Ultimate 2023.2, AndroidStudio 2022.3.1

Installation type

JetBrains ToolBox

OS

macOS 13.1

bchatard commented 1 year ago

Please upgrade your workflow, there is no more js files. Use npm to install it, it's more simple

cafefarm-johnny commented 1 year ago

Thank you! Latest release is support only Alfred 5?

bchatard commented 1 year ago

I use Alfred5 since the release, so I have no feedback with Alfred4

The v1, workflow is no more maintained

cafefarm-johnny commented 1 year ago

Thank you.