diff options
| author | Thomas Linford <tlinford@users.noreply.github.com> | 2022-10-31 16:37:45 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-10-31 16:37:45 +0100 |
| commit | ea86b2f4bc20501cdba87f1482b8dad52b4c9957 (patch) | |
| tree | ad4cbd33cff2995159df1b92e2b1f79e5cc4ed0e /zellij-utils/src/cli.rs | |
| parent | errors: Don't unwrap in `zellij_server::output` (#1878) (diff) | |
| download | sl0ppij-ea86b2f4bc20501cdba87f1482b8dad52b4c9957.tar.gz sl0ppij-ea86b2f4bc20501cdba87f1482b8dad52b4c9957.tar.xz sl0ppij-ea86b2f4bc20501cdba87f1482b8dad52b4c9957.zip | |
fix: resolve setup --clean panic (#1882)
Do not use Config::default()
default() has empty plugins config and that does not work with the default layout.
Use Config::try_from() instead, since it already handles the clean flag.
Also, do not check the clean flag twice, it is already handled in Config::try_from.
Diffstat (limited to 'zellij-utils/src/cli.rs')
| -rw-r--r-- | zellij-utils/src/cli.rs | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/zellij-utils/src/cli.rs b/zellij-utils/src/cli.rs index 6f0ac59a..f860f05f 100644 --- a/zellij-utils/src/cli.rs +++ b/zellij-utils/src/cli.rs @@ -48,15 +48,6 @@ pub struct CliArgs { pub debug: bool, } -impl CliArgs { - pub fn should_clean_config(&self) -> bool { - match &self.command { - Some(Command::Setup(ref setup)) => setup.clean, - _ => false, - } - } -} - #[derive(Debug, Subcommand, Clone, Serialize, Deserialize)] pub enum Command { /// Change the behaviour of zellij |
