[PR #15656] cmd: guard TUI launch against non-interactive terminals #77544

Open
opened 2026-05-05 10:13:13 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/15656
Author: @ssam18
Created: 4/17/2026
Status: 🔄 Open

Base: mainHead: fix/tui-non-interactive-terminal


📝 Commits (1)

  • 43800a5 cmd: guard TUI launch against non-interactive terminals

📊 Changes

1 file changed (+5 additions, -0 deletions)

View changed files

📝 cmd/cmd.go (+5 -0)

📄 Description

Running ollama without a subcommand on systems where stdin/stdout isn't a proper PTY (e.g. Devuan/sysvinit) crashes with a raw mode error from bubbletea. Added the same term.IsTerminal check that already exists for the model selectors, so the command exits with a clear message pointing to ollama serve instead. Fixes #15649.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ollama/ollama/pull/15656 **Author:** [@ssam18](https://github.com/ssam18) **Created:** 4/17/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `fix/tui-non-interactive-terminal` --- ### 📝 Commits (1) - [`43800a5`](https://github.com/ollama/ollama/commit/43800a552f9be3525dde10ad468c62a5abf774cc) cmd: guard TUI launch against non-interactive terminals ### 📊 Changes **1 file changed** (+5 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `cmd/cmd.go` (+5 -0) </details> ### 📄 Description Running `ollama` without a subcommand on systems where stdin/stdout isn't a proper PTY (e.g. Devuan/sysvinit) crashes with a raw mode error from bubbletea. Added the same `term.IsTerminal` check that already exists for the model selectors, so the command exits with a clear message pointing to `ollama serve` instead. Fixes #15649. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-05-05 10:13:13 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#77544