mirror of
https://github.com/open-webui/open-terminal.git
synced 2026-11-05 01:27:28 +00:00
[GH-ISSUE #187] run: OPEN_TERMINAL_API_KEY_FILE crashes startup (both _FILE and env var set) #110
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
open-webui/open-terminal#110
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @jamesdury on GitHub (Oct 7, 2026).
Original GitHub issue: https://github.com/open-webui/open-terminal/issues/187
open-terminal runcannot start when the key is given throughOPEN_TERMINAL_API_KEY_FILE, the Docker-secrets routeenv.pydocuments.Reproduce
Seen on 0.14.0; the same lines are on
main.Cause
cli.pyrunreadsOPEN_TERMINAL_API_KEY_FILE(around line 78), then writes the key back withos.environ["OPEN_TERMINAL_API_KEY"] = api_key(line 91). Whenenv.pyis imported afterwards,_resolve_file_env("OPEN_TERMINAL_API_KEY")sees both variables set and raises. Only therunpath is affected: the_FILEvariable is never removed after being consumed.Suggested fix
In
run, remove the_FILEvariable once the key has been resolved, next to whereOPEN_TERMINAL_API_KEYis set:Then drop the now-redundant
_FILEhandling fromrunitself and letenv._resolve_file_envbe the single place that reads it, so the two code paths can't disagree again.