Skip to content

Commit

Permalink
wrap sh -c
Browse files Browse the repository at this point in the history
  • Loading branch information
et-nik committed Feb 14, 2024
1 parent 1f68fcc commit 822a073
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion internal/processmanager/tmux.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,11 @@ func (pm *Tmux) Start(
return domain.ErrorResult, errors.WithMessage(err, "invalid server configuration")
}

tmuxCmd := fmt.Sprintf(`tmux new-session -d -s %s -x %d %s`, server.UUID(), defaultWidth, startCmd)

result, err := pm.executor.ExecWithWriter(
ctx,
fmt.Sprintf(`tmux new-session -d -s %s -x %d %s`, server.UUID(), defaultWidth, startCmd),
fmt.Sprintf(`sh -c %s`, strconv.Quote(tmuxCmd)),
out,
options,
)
Expand Down

0 comments on commit 822a073

Please sign in to comment.