Skip to content

Tmux session is killed when before_script fails while using --append #1051

@qadzek

Description

@qadzek

Let me first thank you for this amazing tool! Running tmuxp load has quickly become the very first thing I do when I return to a project.

However, I've noticed the following rather annoying bug.

Let's say we have the following workspace file .tmuxp.yaml.:

session_name: foo
before_script: /bin/false
windows:
  - window_name: bar
    panes:
      - date

When we create a tmuxp session with tmuxp load .tmuxp.yaml it errors out as expected:

tmuxp.exc.BeforeLoadScriptError: before_script failed with returncode 1.
command: /bin/false
Error output:

So far, so good. However, if we first create a Tmux session with a couple of windows:

tmux new-session -d -s dev -n first_window
tmux new-window -t dev -n second_window
tmux new-window -t dev -n third_window
tmux attach -t dev

and then create the tmuxp session with the --append flag: tmuxp load --append .tmuxp.yaml, I get only [exited] as output, and my entire Tmux session (including existing windows) is gone.

Hopefully you can reproduce this. Thanks again for tmuxp!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions