joshuar / go-hass-agent

A Home Assistant, native app for desktop/laptop devices.
MIT License
136 stars 11 forks source link

[BUG] upgrade command not working. Wrong config path expected. #268

Closed dflvunoooooo closed 1 week ago

dflvunoooooo commented 1 week ago

Go Hass Agent Version Go Hass Agent: v10.1.1

Describe the bug

Maybe related to #223?

To Reproduce Steps to reproduce the behaviour:

  1. (Delete all folders and stop the daemon if no clean install)
  2. (run go-hass-agent register --force --terminal --server _URL_ --token _TOKEN_ if not already done)
  3. run go-hass-agent --terminal upgrade
  4. See error.

Expected behaviour I would expect go-hass-agent to check the correct path.

Logs

Sep  5 22:49:30.305 WARN Upgrade failed. You may need to upgrade manually. Check
https://github.com/joshuar/go-hass-agent/blob/main/docs/BREAKING_CHANGES.md for
manual steps required.
 error="no directory from previous version found\nstat /home/alarm/.config/com.github.joshuar.go-hass-agent: no such file or directory"
go-hass-agent: error: upgrade failed: no directory from previous version found
                      stat /home/alarm/.config/com.github.joshuar.go-hass-agent: no such file or directory
…

Desktop (please complete the following information):

joshuar commented 1 week ago

Hey @dflvunoooooo, you'll only need to run the upgrade command one-time if you had a previous version 9 (or lower) installation, and have upgraded to v10+. So this error is expected as the upgrade command could not find any previous version to upgrade as you just registered with v10+. You don't need to run the upgrade command for minor/patch version upgrades.

I'll adjust the command so it doesn't report an error in this scenario (no previous installation).

dflvunoooooo commented 1 week ago

That makes absolute sense. It was a bit late yesterday, sorry.