Last active
July 21, 2024 04:24
-
-
Save jcwillox/a9b480f8d180d44368e7df2eb7009207 to your computer and use it in GitHub Desktop.
PowerShell script to automatically add context menu entries for Jetbrains IDEs
I think I need a little more context/guidance for this one. First, the installation instructions needed an explicit parameter in modern pwsh:
❌
iwr https://gist.github.com/jcwillox/a9b480f8d180d44368e7df2eb7009207/raw/toolbox-context-menu.ps1 -o toolbox-context-menu.ps1
Invoke-WebRequest: Parameter cannot be processed because the parameter name 'o' is ambiguous. Possible matches include: -OperationTimeoutSeconds -OutFile -OutVariable -OutBuffer.
👇
✅
iwr https://gist.github.com/jcwillox/a9b480f8d180d44368e7df2eb7009207/raw/toolbox-context-menu.ps1 -OutFile toolbox-context-menu.ps1
Now, how exactly do I use it?
No matter the parameters, I get an error:
pwsh> .\toolbox-context-menu.ps1 webstorm
WARNING: no channels found in 'C:\Users\josch\AppData\Local\JetBrains\Toolbox\apps\Datalore'
WARNING: no channels found in 'C:\Users\josch\AppData\Local\JetBrains\Toolbox\apps\JetBrainsGateway'
Exception: D:\projects\toolbox-context-menu.ps1:101
Line |
101 | $binPath = Join-Path $versionPath "bin"
| ~~~~~~~~~~~~
| Cannot bind argument to parameter 'Path' because it is null.
Yep thanks, the download command is broken in my terminal now too, pretty bad of them to break that in a minor update, but anyhow, I've updated the download command.
That comment provides the usage instructions too, and it looks like you're not running the correct command, for toolbox v2, you should use something like this
.\toolbox-context-menu.ps1 -AppDir "C:\Users\%USERNAME%\AppData\Local\Programs\PyCharm Professional"
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Forgot to update the instructions comment at the top for toolbox 2.0, but better late than never, you can just use the direct install method now.
https://gist.github.com/jcwillox/a9b480f8d180d44368e7df2eb7009207?permalink_comment_id=4037552#gistcomment-4037552