diff options
| author | a-kenji <aks.kenji@protonmail.com> | 2021-07-22 18:44:29 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-07-22 18:44:29 +0200 |
| commit | e2d086d591dc97c612cdb0778deea1c123a8cfb0 (patch) | |
| tree | dd6a10add6d29492631e44e9833d0274f1586094 /src | |
| parent | docs(changelog): display session-name in tab-bar (diff) | |
| parent | Add cmd to dump layout to stdout (diff) | |
| download | sl0ppij-e2d086d591dc97c612cdb0778deea1c123a8cfb0.tar.gz sl0ppij-e2d086d591dc97c612cdb0778deea1c123a8cfb0.tar.xz sl0ppij-e2d086d591dc97c612cdb0778deea1c123a8cfb0.zip | |
Merge pull request #623 from a-kenji/feature/dump-layout
Add cmd to dump `layout` to stdout
Diffstat (limited to 'src')
| -rw-r--r-- | src/main.rs | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/main.rs b/src/main.rs index 612e130e..22f373a2 100644 --- a/src/main.rs +++ b/src/main.rs @@ -36,8 +36,14 @@ pub fn main() { let config_options = Options::from_cli(&config.options, opts.command.clone()); if let Some(Command::Setup(ref setup)) = opts.command { - Setup::from_cli(setup, &opts, &config_options).expect("Failed to print to stdout"); - } + Setup::from_cli(setup, &opts, &config_options).map_or_else( + |e| { + eprintln!("{:?}", e); + process::exit(1); + }, + |_| {}, + ); + }; atomic_create_dir(&*ZELLIJ_TMP_DIR).unwrap(); atomic_create_dir(&*ZELLIJ_TMP_LOG_DIR).unwrap(); |
