🐛 fix OnProjectStart
should only run when session is created.
This commit is contained in:
parent
1ff2a54582
commit
3abfabb1b4
@ -29,6 +29,9 @@ func StartProject(name string) {
|
|||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tmux := CreateTmux(false)
|
||||||
|
|
||||||
|
if !sessionExists(name) {
|
||||||
// Run startup commands
|
// Run startup commands
|
||||||
if len(p.OnProjectStart) > 0 {
|
if len(p.OnProjectStart) > 0 {
|
||||||
for _, command := range p.OnProjectStart {
|
for _, command := range p.OnProjectStart {
|
||||||
@ -45,9 +48,6 @@ func StartProject(name string) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
tmux := CreateTmux(false)
|
|
||||||
|
|
||||||
if !sessionExists(name) {
|
|
||||||
tmux.Run("new-session", "-d", "-s", name, "-n", p.Windows[0].Name, "-c", p.Windows[0].Root)
|
tmux.Run("new-session", "-d", "-s", name, "-n", p.Windows[0].Name, "-c", p.Windows[0].Root)
|
||||||
|
|
||||||
for index, window := range p.Windows {
|
for index, window := range p.Windows {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user