aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJae-Heon Ji <32578710+jaeheonji@users.noreply.github.com>2022-04-16 16:11:46 +0900
committerGitHub <noreply@github.com>2022-04-16 16:11:46 +0900
commitf2a7e73687a3fbdce3ee8ace63f4b741239fd41d (patch)
tree132f0f378bb7ee414eb4544532551f19885eb685 /src
parentdocs(changelog): copy_on_select option (diff)
downloadsl0ppij-f2a7e73687a3fbdce3ee8ace63f4b741239fd41d.tar.gz
sl0ppij-f2a7e73687a3fbdce3ee8ace63f4b741239fd41d.tar.xz
sl0ppij-f2a7e73687a3fbdce3ee8ace63f4b741239fd41d.zip
fix: minor system improvements (#1328)
Diffstat (limited to 'src')
-rw-r--r--src/commands.rs6
-rw-r--r--src/install.rs2
2 files changed, 4 insertions, 4 deletions
diff --git a/src/commands.rs b/src/commands.rs
index cfbcb8f0..f940e76c 100644
--- a/src/commands.rs
+++ b/src/commands.rs
@@ -25,7 +25,7 @@ pub(crate) use crate::sessions::list_sessions;
pub(crate) fn kill_all_sessions(yes: bool) {
match get_sessions() {
Ok(sessions) if sessions.is_empty() => {
- println!("No active zellij sessions found.");
+ eprintln!("No active zellij sessions found.");
process::exit(1);
}
Ok(sessions) => {
@@ -119,7 +119,7 @@ fn attach_with_session_index(config_options: Options, index: usize, create: bool
if create {
create_new_client()
} else {
- println!("No active zellij sessions found.");
+ eprintln!("No active zellij sessions found.");
process::exit(1);
}
}
@@ -151,7 +151,7 @@ fn attach_with_session_name(
None => match get_active_session() {
ActiveSession::None if create => create_new_client(),
ActiveSession::None => {
- println!("No active zellij sessions found.");
+ eprintln!("No active zellij sessions found.");
process::exit(1);
}
ActiveSession::One(session_name) => ClientInfo::Attach(session_name, config_options),
diff --git a/src/install.rs b/src/install.rs
index 047c2370..95f1f0db 100644
--- a/src/install.rs
+++ b/src/install.rs
@@ -36,7 +36,7 @@ pub(crate) fn populate_data_dir(data_dir: &Path) {
// We already have the path and the parent through `data_dir`
if let Some(parent_path) = path.parent() {
fs::create_dir_all(parent_path).unwrap_or_else(|e| log::error!("{:?}", e));
- set_permissions(parent_path).unwrap_or_else(|e| log::error!("{:?}", e));
+ set_permissions(parent_path, 0o700).unwrap_or_else(|e| log::error!("{:?}", e));
if out_of_date || !path.exists() {
fs::write(path, bytes)
.unwrap_or_else(|e| log::error!("Failed to install default assets! {:?}", e));