Fix tmux panic (#165)
Fix `tmux` sessions This will create a new session named `topgrade`, `topgrade-1`, `topgrade-2`, using the first nonexistent session name it finds. That session will have a window in it named `topgrade` in which `topgrade` is run. If `topgrade --tmux` is being run from within tmux, it won't attach to the new tmux session. If the user is not currently in tmux, it will attach to the newly-created session. Co-authored-by: Thomas Schönauer <37108907+DottoDev@users.noreply.github.com>
This commit is contained in:
committed by
Thomas Schönauer
parent
d4fe748814
commit
71883d7164
@@ -82,7 +82,8 @@ fn run() -> Result<()> {
|
||||
if config.run_in_tmux() && env::var("TOPGRADE_INSIDE_TMUX").is_err() {
|
||||
#[cfg(unix)]
|
||||
{
|
||||
tmux::run_in_tmux(config.tmux_arguments()?);
|
||||
tmux::run_in_tmux(config.tmux_arguments()?)?;
|
||||
return Ok(());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user