Skip to content

Commit

Permalink
chore: add minor comments
Browse files Browse the repository at this point in the history
  • Loading branch information
graelo committed Aug 29, 2023
1 parent d9a7dc0 commit 13deab8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/actions/restore.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,13 @@ pub async fn restore<P: AsRef<Path>>(backup_filepath: P) -> Result<v1::Overview>
v1::unpack(backup_filepath.as_ref(), temp_dir.path()).await?;
let panes_content_dir = temp_dir.path().join("panes-content");

// Start tmux if needed.
let not_in_tmux = std::env::var("TMUX").is_err();
if not_in_tmux {
tmux::server::start(PLACEHOLDER_SESSION_NAME).await?;
}

// Get the default command used to start panes.
let default_command = tmux::server::default_command().await?;

// Restore sessions, windows and panes.
Expand Down
2 changes: 1 addition & 1 deletion src/bin/tmux-backup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ async fn init_catalog<P: AsRef<Path>>(
Err(e) => {
failure_message(
format!(
"🛑 Catalog error at `{}`: {e}",
"🛑 Catalog cannot be created from `{}`: {e}",
backup_dirpath.as_ref().to_string_lossy()
),
Output::Both,
Expand Down

0 comments on commit 13deab8

Please sign in to comment.