summaryrefslogtreecommitdiff
path: root/internal/eventloop.go
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-03-02 08:51:47 +0200
committerPaul Buetow <paul@buetow.org>2026-03-02 08:51:47 +0200
commit24a9cd22ac9e6436c4d45b8a2e112e7094c83113 (patch)
tree1d83559f07f413fddb8d50dd6bd12656ea8cb86e /internal/eventloop.go
parent717cf6a47cd19cc284b023825a3bac3272ebe171 (diff)
Launch live browser opener as invoking sudo user
Diffstat (limited to 'internal/eventloop.go')
-rw-r--r--internal/eventloop.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/internal/eventloop.go b/internal/eventloop.go
index 0f593fd..440fdd6 100644
--- a/internal/eventloop.go
+++ b/internal/eventloop.go
@@ -286,6 +286,9 @@ func (e *eventLoop) run(ctx context.Context, rawCh <-chan []byte) {
liveOptions := flamegraph.LiveServerOptions{
OpenCommand: e.cfg.liveOpenCommand,
}
+ if e.warningCb != nil {
+ liveOptions.WarningCb = e.notifyWarning
+ }
if err := flamegraph.ServeLiveWithOptions(ctx, e.liveTrie, e.cfg.liveInterval, liveOptions); err != nil && ctx.Err() == nil {
fmt.Println("Live flamegraph server error:", err)
}