diff options
| author | Aram Drevekenin <aram@poor.dev> | 2023-03-08 16:39:54 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-03-08 16:39:54 +0100 |
| commit | 0fc778210b69385dc32674637708fc21f8ec257e (patch) | |
| tree | fbb8251a280c191fa3ea0f95c3734a64e3a84bfa /src | |
| parent | chore(release): v0.35.1 (diff) | |
| download | sl0ppij-0fc778210b69385dc32674637708fc21f8ec257e.tar.gz sl0ppij-0fc778210b69385dc32674637708fc21f8ec257e.tar.xz sl0ppij-0fc778210b69385dc32674637708fc21f8ec257e.zip | |
fix(sessions): attach --create regression (#2247)
* fix(sessions): get attach --create working
* style(fmt): rustfmt
Diffstat (limited to 'src')
| -rw-r--r-- | src/commands.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/commands.rs b/src/commands.rs index d8f37a7a..0394a934 100644 --- a/src/commands.rs +++ b/src/commands.rs @@ -352,7 +352,11 @@ pub(crate) fn start_client(opts: CliArgs) { let client = if let Some(idx) = index { attach_with_session_index(config_options.clone(), idx, create) } else { - if create { + let session_exists = session_name + .as_ref() + .and_then(|s| session_exists(&s).ok()) + .unwrap_or(false); + if create && !session_exists { session_name.clone().map(start_client_plan); } attach_with_session_name(session_name, config_options.clone(), create) |
