Skip to content

Commit a4d4542

Browse files
ploMP4tharropoulos
authored andcommitted
fix(cmd): hot reload on config
1 parent 4af6438 commit a4d4542

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

cmd/root.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,11 @@ func watchFileChanges(
133133
return
134134
}
135135

136+
if err := config.Load(configPath); err != nil {
137+
p.Send(tui.UpdateSlidesMsg{NewRoot: createErrorSlide(err, "none")})
138+
return
139+
}
140+
136141
newRoot, err := parseSlides(string(data))
137142
if err != nil {
138143
p.Send(tui.UpdateSlidesMsg{NewRoot: createErrorSlide(err, "none")})

0 commit comments

Comments
 (0)