fran-f / keypirinha-terminal-profiles

A plugin to integrate Keypirinha and Windows Terminal
MIT License
18 stars 1 forks source link

Could not find Windows Terminal when using Windows Terminal Preview #6

Closed cderv closed 4 years ago

cderv commented 4 years ago

Maybe it is also related to #4 as I am using the Terminal Preview

I got this at installation

09:48:15.647 PackageControl.PackageControl: Installed package 'keypirinha-terminal-profiles'
09:48:17.149 Plugin loaded: Terminal-Profiles.TerminalProfiles (instance #2)
09:48:17.164 ** ERROR: Error from Terminal-Profiles.TerminalProfiles.on_start: <class 'ValueError'>: Could not find Windows Terminal settings at C:\Users\chris\AppData\Local\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState\settings.json
Traceback (most recent call last):
  File "C:\Users\chris\scoop\apps\keypirinha\current\portable\Profile\InstalledPackages\Terminal-Profiles.keypirinha-package\TerminalProfiles.py", line 34, in on_start
  File "C:\Users\chris\scoop\apps\keypirinha\current\portable\Profile\InstalledPackages\Terminal-Profiles.keypirinha-package\TerminalProfiles.py", line 71, in _load_settings
  File "C:\Users\chris\scoop\apps\keypirinha\current\portable\Profile\InstalledPackages\Terminal-Profiles.keypirinha-package\lib\WindowsTerminalWrapper.py", line 26, in __init__

This is because the setting file is in

C:\Users\chris\AppData\Local\Packages\Microsoft.WindowsTerminalPreview_8wekyb3d8bbwe\LocalState

Note the Microsoft.WindowsTerminalPreview_8wekyb3d8bbwe while the extension is looking in Microsoft.WindowsTerminal_8wekyb3d8bbwe

Let's note that wt.exe is existing and is for the preview version..

How do you determine the setting folder ?

fran-f commented 4 years ago

The path is hardcoded at the moment, but it can be changed in the configuration. I'm starting to think I should look for both though, add profiles from both configuration files in the catalog, and open them in the expected version.

cderv commented 4 years ago

I'm starting to think I should look for both though, add profiles from both configuration files in the catalog, and open them in the expected version.

Yes this could be a good idea ! It would allow to work without modifying configuration.

The path is hardcoded at the moment, but it can be changed in the configuration. I

Thanks I had not check before opening the issue ! 😅

fran-f commented 4 years ago

There's a new release which should support multiple installations. Could you give it a try and see if it works as you would expect?

Note that the configuration format has slightly changed, so if you defined a custom item prefix you'll have to move it to the section matching the installation you want it to apply to.

cderv commented 4 years ago

Yes this now install and works as expected thank you !

fran-f commented 4 years ago

Glad to read that!