-
-
Notifications
You must be signed in to change notification settings - Fork 260
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Portable Espanso on Windows does not override installed copy #1975
Comments
With the help of @joh6nn I have worked out that this issue rides on the way in which portable Espanso is started. The following notes are from Windows 11 using Powershell, with portable Espanso in D:\Temp\EspansoPortable. If I exit installed Espanso and start portable Espanso from the portable folder using 'START_ESPANSO.bat' (as recommended in the portable readme.txt file) and then enter 'espanso path' I get the following response:
If I then install a package using 'espanso install package-name' it goes into the default packages folder for installed Espanso even though portable Espanso is running. However, if I exit portable Espanso and restart it using '.\espanso.cmd start' followed by '.\espanso.cmd path' I get the following response:
If I then install a package using '.\espanso.cmd install package-name' it goes into the packages folder for portable Espanso as expected. In summary, this issue is not a bug but it would be a useful enhancement if it was clarified in the readme file and Espanso docs. |
https://github.com/search?q=repo%3Aespanso%2Fespanso%20start_espanso.bat&type=code appears to show the origin of Is the code, or the documentation, incorrect? |
@smeech START_ESPANSO.bat is a batch file with the following content:
This differs from espanso.cmd which is a command that contains:
I can use either to start portable Espanso but the first one picks up paths from the installed copy of Espanso while the second one picks up the expected portable paths. There is a comment at the foot of the README.txt for portable Espanso, which indicates that espanso.cmd handles STD console handles correctly. However, I think most users would take the advice of the top of the file to start espanso by clicking on START_ESPANSO.bat (also advised at https://espanso.org/docs/get-started). |
Does it make a difference if installed Espanso hasn't been run? Do we need to correct the code, or the documentation? |
@smeech It doesn't make a difference if installed Espanso has not been run. It seems that |
Description
I have been testing portable mode on a Windows 11 laptop with an installed copy of Espanso 2.2.1. After exit from the installed copy I started a portable copy. However, the running copy of portable Espanso does not override the installed version of espanso. If I open a command prompt (even from the portable Espanso program folder) and type 'espanso path' I still see the installed Espanso paths. Also if I install a package from the hub while running portable Espanso it will install to the default installed location rather than to the portable folder .espanso\match\packages. To resolve this issue it is necessary to uninstall the installed copy of Espanso and then run espanso.cmd from the portable Espanso program folder.
(Originally posted in closed issue: #623 (comment))
Steps to reproduce
Exit installed Espanso (without uninstall) and start portable Espanso. Install a package from the Espanso Hub.
Expected behavior
Packages should install to .espanso\match\packages while portable Espanso is running but instead install to the default installed location.
Screenshots
No response
Logs
No response
Your environment
Self-service
The text was updated successfully, but these errors were encountered: