[PR #3470] [MERGED] cmd: provide feedback if OLLAMA_MODELS is set on run command #11168

Closed
opened 2026-04-12 23:23:06 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/3470
Author: @bmizerany
Created: 4/3/2024
Status: Merged
Merged: 4/3/2024
Merged by: @bmizerany

Base: mainHead: bmizerany/ollama_models_set_feedback


📝 Commits (1)

  • b910ff4 cmd: provide feedback if OLLAMA_MODELS is set on non-serve command

📊 Changes

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

View changed files

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

📄 Description

This also moves the checkServerHeartbeat call out of the "RunE" Cobra stuff (that's the only word I have for that) to on-site where it's after the check for OLLAMA_MODELS, which allows the helpful error message to be printed before the server heartbeat check. This also arguably makes the code more readable without the magic/superfluous "pre" function caller.


🔄 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/3470 **Author:** [@bmizerany](https://github.com/bmizerany) **Created:** 4/3/2024 **Status:** ✅ Merged **Merged:** 4/3/2024 **Merged by:** [@bmizerany](https://github.com/bmizerany) **Base:** `main` ← **Head:** `bmizerany/ollama_models_set_feedback` --- ### 📝 Commits (1) - [`b910ff4`](https://github.com/ollama/ollama/commit/b910ff4e7318c7b04f4abb7371fee04dde0e5445) cmd: provide feedback if OLLAMA_MODELS is set on non-serve command ### 📊 Changes **1 file changed** (+12 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `cmd/cmd.go` (+12 -5) </details> ### 📄 Description This also moves the checkServerHeartbeat call out of the "RunE" Cobra stuff (that's the only word I have for that) to on-site where it's after the check for OLLAMA_MODELS, which allows the helpful error message to be printed before the server heartbeat check. This also arguably makes the code more readable without the magic/superfluous "pre" function caller. --- <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-04-12 23:23:06 -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#11168