mirror of
https://github.com/nukesor/pueue
synced 2024-09-06 07:53:41 +00:00
fix: Load updated configs on daemon restart
This commit is contained in:
parent
ac9ecc29d1
commit
6af8b34b4c
|
@ -10,6 +10,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|||
|
||||
- Add the `--working-directory` parameter to the `pueue add` command [#227](https://github.com/Nukesor/pueue/issues/227).
|
||||
|
||||
## [1.0.2] - 12-09-2021
|
||||
|
||||
### Fix
|
||||
|
||||
- Settings weren't always read on daemon restart.
|
||||
This bug was introduced in `1.0.0` due to large-scale refactorings and insufficient testing.
|
||||
|
||||
## [1.0.1] - 20-08-2021
|
||||
|
||||
### Fix
|
||||
|
|
|
@ -62,7 +62,7 @@ pub async fn run(config_path: Option<PathBuf>, test: bool) -> Result<()> {
|
|||
// Restore the previous state and save any changes that might have happened during this
|
||||
// process. If no previous state exists, just create a new one.
|
||||
// Create a new empty state if any errors occur, but print the error message.
|
||||
let state = match restore_state(&settings.shared.pueue_directory()) {
|
||||
let mut state = match restore_state(&settings.shared.pueue_directory()) {
|
||||
Ok(Some(state)) => state,
|
||||
Ok(None) => State::new(&settings, config_path.clone()),
|
||||
Err(error) => {
|
||||
|
@ -71,6 +71,7 @@ pub async fn run(config_path: Option<PathBuf>, test: bool) -> Result<()> {
|
|||
State::new(&settings, config_path.clone())
|
||||
}
|
||||
};
|
||||
state.settings = settings.clone();
|
||||
save_state(&state)?;
|
||||
let state = Arc::new(Mutex::new(state));
|
||||
|
||||
|
|
Loading…
Reference in a new issue