detached 879e5fe

fix(cef): propagate selected runtime to helpers

commit
879e5fe524a16c3444cb46f7ada1bf4600c7ec26
author
brice · · 2026-07-14 07:38 UTC
committer
brice · · 2026-07-14 09:35 UTC
parent
eee76d7
signature
GPG VerifiedCD88F9E564E0102646FB6077A1A07C7C7C3E349D · arch-gpg Verified for the committer email
1 file · +19 -3
M internal/infrastructure/cef/engine_init.go +19 -3
@@ -147,6 +147,24 @@ func resolvedStateRoot(defaultStateRoot string, opts port.EngineOptions) string
147147 return defaultStateRoot
148148 }
149149
150+// configureCEFSubprocessRuntime chooses the CEF runtime used by both the
151+// browser and CEF helper processes. CEF re-execs this binary for helpers before
152+// Dumber can load configuration, so the selected configured runtime must be in
153+// its inherited environment before InitWithApp launches any child. A caller's
154+// explicit CEF_DIR remains the override for both process types.
155+func configureCEFSubprocessRuntime(configured string) string {
156+ if explicit := os.Getenv("CEF_DIR"); explicit != "" {
157+ return explicit
158+ }
159+ if configured == "" {
160+ return ""
161+ }
162+ if err := os.Setenv("CEF_DIR", configured); err != nil {
163+ return configured
164+ }
165+ return configured
166+}
167+
150168 // prepareCEFSettings builds purecef.Settings from the engine config.
151169 func prepareCEFSettings(
152170 opts port.EngineOptions,
@@ -170,9 +188,7 @@ func prepareCEFSettings(
170188 settings.MultiThreadedMessageLoop = true
171189 settings.ExternalMessagePump = false
172190 settings.RootCachePath = resolvedStateRoot(paths.StateRoot, opts)
173- if cfg.CEFDir != "" {
174- settings.CEFDir = cfg.CEFDir
175- }
191+ settings.CEFDir = configureCEFSubprocessRuntime(cfg.CEFDir)
176192 if runtimeLogFile, err := prepareCEFLogFile(paths.LogFile, cfg.LogFile); err != nil {
177193 logger.Warn().Err(err).Msg("cef: failed to prepare runtime log file")
178194 } else {
@@ -147,6 +147,24 @@ func resolvedStateRoot(defaultStateRoot string, opts port.EngineOptions) string
147 return defaultStateRoot147 return defaultStateRoot
148 }148 }
149 149
150+// configureCEFSubprocessRuntime chooses the CEF runtime used by both the
151+// browser and CEF helper processes. CEF re-execs this binary for helpers before
152+// Dumber can load configuration, so the selected configured runtime must be in
153+// its inherited environment before InitWithApp launches any child. A caller's
154+// explicit CEF_DIR remains the override for both process types.
155+func configureCEFSubprocessRuntime(configured string) string {
156+ if explicit := os.Getenv("CEF_DIR"); explicit != "" {
157+ return explicit
158+ }
159+ if configured == "" {
160+ return ""
161+ }
162+ if err := os.Setenv("CEF_DIR", configured); err != nil {
163+ return configured
164+ }
165+ return configured
166+}
167+
150 // prepareCEFSettings builds purecef.Settings from the engine config.168 // prepareCEFSettings builds purecef.Settings from the engine config.
151 func prepareCEFSettings(169 func prepareCEFSettings(
152 opts port.EngineOptions,170 opts port.EngineOptions,
@@ -170,9 +188,7 @@ func prepareCEFSettings(
170 settings.MultiThreadedMessageLoop = true188 settings.MultiThreadedMessageLoop = true
171 settings.ExternalMessagePump = false189 settings.ExternalMessagePump = false
172 settings.RootCachePath = resolvedStateRoot(paths.StateRoot, opts)190 settings.RootCachePath = resolvedStateRoot(paths.StateRoot, opts)
173- if cfg.CEFDir != "" {191+ settings.CEFDir = configureCEFSubprocessRuntime(cfg.CEFDir)
174- settings.CEFDir = cfg.CEFDir
175- }
176 if runtimeLogFile, err := prepareCEFLogFile(paths.LogFile, cfg.LogFile); err != nil {192 if runtimeLogFile, err := prepareCEFLogFile(paths.LogFile, cfg.LogFile); err != nil {
177 logger.Warn().Err(err).Msg("cef: failed to prepare runtime log file")193 logger.Warn().Err(err).Msg("cef: failed to prepare runtime log file")
178 } else {194 } else {

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 8

Tags 42

↑↓ moveenter openesc close