aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAram Drevekenin <aram@poor.dev>2025-07-16 12:03:32 +0200
committerGitHub <noreply@github.com>2025-07-16 12:03:32 +0200
commit4a68c6d90b8942c81f25f465964eeb28fb5bb95f (patch)
tree7b21dc3328322315484955aef5f680f228d31a73 /src
parentfix(sessions): remove popups from welcome screen (#4294) (diff)
downloadsl0ppij-4a68c6d90b8942c81f25f465964eeb28fb5bb95f.tar.gz
sl0ppij-4a68c6d90b8942c81f25f465964eeb28fb5bb95f.tar.xz
sl0ppij-4a68c6d90b8942c81f25f465964eeb28fb5bb95f.zip
fix(resurrection): do not parse resurrection layouts on startup (#4292)
* fix(resurrection): do not parse resurrection layouts on startup * proper error when file is corrupt * docs(changelog): add PR * fix attach command * style(fmt): rustfmt
Diffstat (limited to 'src')
-rw-r--r--src/commands.rs12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/commands.rs b/src/commands.rs
index 952102c8..87f256d6 100644
--- a/src/commands.rs
+++ b/src/commands.rs
@@ -90,7 +90,7 @@ pub(crate) fn delete_all_sessions(yes: bool, force: bool) {
} else {
resurrectable_sessions
.iter()
- .filter(|(name, _, _)| !active_sessions.contains(name))
+ .filter(|(name, _)| !active_sessions.contains(name))
.cloned()
.collect()
};
@@ -699,7 +699,15 @@ pub(crate) fn start_client(opts: CliArgs) {
.and_then(|s| session_exists(&s).ok())
.unwrap_or(false);
let resurrection_layout =
- session_name.as_ref().and_then(|s| resurrection_layout(&s));
+ session_name
+ .as_ref()
+ .and_then(|s| match resurrection_layout(&s) {
+ Ok(layout) => layout,
+ Err(e) => {
+ eprintln!("{}", e);
+ process::exit(2);
+ },
+ });
if (create || should_create_detached)
&& !session_exists
&& resurrection_layout.is_none()