diff options
| author | a-kenji <aks.kenji@protonmail.com> | 2022-03-04 17:55:16 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-03-04 17:55:16 +0100 |
| commit | 6ad2d55a5d79cb16948e8261d35a860bcae69ba0 (patch) | |
| tree | 8974d93e64001a7722dbbfa42969f5a8a3fe89ce /src | |
| parent | docs(contrib): fix markup (diff) | |
| download | sl0ppij-6ad2d55a5d79cb16948e8261d35a860bcae69ba0.tar.gz sl0ppij-6ad2d55a5d79cb16948e8261d35a860bcae69ba0.tar.xz sl0ppij-6ad2d55a5d79cb16948e8261d35a860bcae69ba0.zip | |
fix(cli): `list-sessions` stderr on fail (#1174)
Change `list-sessions` to report an error `1` on the shell
and put the output to stderr,
this can be valuable for scriping and should be consistent with expectations
Diffstat (limited to 'src')
| -rw-r--r-- | src/sessions.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/sessions.rs b/src/sessions.rs index d05287e4..20dfcc56 100644 --- a/src/sessions.rs +++ b/src/sessions.rs @@ -133,8 +133,8 @@ pub(crate) fn list_sessions() { 0 } Ok(_) => { - println!("No active zellij sessions found."); - 0 + eprintln!("No active zellij sessions found."); + 1 } Err(e) => { eprintln!("Error occurred: {:?}", e); |
