[PR #3068] [MERGED] Use stdin for term discovery on windows #9788

Closed
opened 2025-11-12 15:14:12 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/3068
Author: @dhiltgen
Created: 3/11/2024
Status: Merged
Merged: 3/14/2024
Merged by: @dhiltgen

Base: mainHead: win_pipe


📝 Commits (1)

  • c1a81c6 Use stdin for term discovery on windows

📊 Changes

1 file changed (+1 additions, -2 deletions)

View changed files

📝 cmd/cmd.go (+1 -2)

📄 Description

When you feed input to the cmd via a pipe it no longer reports a warning

Before:

> echo "what is the captial of australia" | .\ollama.exe run phi
failed to get console mode for stdin: The handle is invalid.
 The capital of Australia is Canberra. It's located in the Australian Capital Territory, about 120 kilometers
northwest of Sydney and 130 kilometers southwest of Melbourne.

After fix:

> echo "what is the captial of australia" | .\ollama.exe run phi
 The capital city of Australia is Canberra. It is located in the Australian Capital Territory (ACT) and is home to important government buildings, such as Parliament House and the National Museum of Australia

Fixes #2698


🔄 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/3068 **Author:** [@dhiltgen](https://github.com/dhiltgen) **Created:** 3/11/2024 **Status:** ✅ Merged **Merged:** 3/14/2024 **Merged by:** [@dhiltgen](https://github.com/dhiltgen) **Base:** `main` ← **Head:** `win_pipe` --- ### 📝 Commits (1) - [`c1a81c6`](https://github.com/ollama/ollama/commit/c1a81c6fe3e56e7e185a890cb30a5e57462e9a3f) Use stdin for term discovery on windows ### 📊 Changes **1 file changed** (+1 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `cmd/cmd.go` (+1 -2) </details> ### 📄 Description When you feed input to the cmd via a pipe it no longer reports a warning Before: ``` > echo "what is the captial of australia" | .\ollama.exe run phi failed to get console mode for stdin: The handle is invalid. The capital of Australia is Canberra. It's located in the Australian Capital Territory, about 120 kilometers northwest of Sydney and 130 kilometers southwest of Melbourne. ``` After fix: ``` > echo "what is the captial of australia" | .\ollama.exe run phi The capital city of Australia is Canberra. It is located in the Australian Capital Territory (ACT) and is home to important government buildings, such as Parliament House and the National Museum of Australia ``` Fixes #2698 --- <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 2025-11-12 15:14:12 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama-ollama#9788