[PR #9089] [MERGED] llm: attempt to evaluate symlinks for os.Executable, but do not fail #12856

Closed
opened 2026-04-13 00:11:21 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/9089
Author: @jmorganca
Created: 2/14/2025
Status: Merged
Merged: 2/14/2025
Merged by: @jmorganca

Base: mainHead: jmorganca/attemp-eval


📝 Commits (1)

  • a4a455d llm: attempt to evaluate symlinks, but do not fail

📊 Changes

2 files changed (+8 additions, -0 deletions)

View changed files

📝 discover/path.go (+4 -0)
📝 llm/server.go (+4 -0)

📄 Description

This PR provides a better approach to https://github.com/ollama/ollama/pull/9088 that will attempt to evaluate symlinks (important for macOS where ollama is often a symlink), but use the result of os.Executable() as a fallback in scenarios where filepath.EvalSymlinks fails due to permission errors.

Fixes https://github.com/ollama/ollama/issues/9082


🔄 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/9089 **Author:** [@jmorganca](https://github.com/jmorganca) **Created:** 2/14/2025 **Status:** ✅ Merged **Merged:** 2/14/2025 **Merged by:** [@jmorganca](https://github.com/jmorganca) **Base:** `main` ← **Head:** `jmorganca/attemp-eval` --- ### 📝 Commits (1) - [`a4a455d`](https://github.com/ollama/ollama/commit/a4a455dbf3b4248ad5b28f96f28ce1537adae609) llm: attempt to evaluate symlinks, but do not fail ### 📊 Changes **2 files changed** (+8 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `discover/path.go` (+4 -0) 📝 `llm/server.go` (+4 -0) </details> ### 📄 Description This PR provides a better approach to https://github.com/ollama/ollama/pull/9088 that will attempt to evaluate symlinks (important for macOS where `ollama` is often a symlink), but use the result of `os.Executable()` as a fallback in scenarios where `filepath.EvalSymlinks` fails due to permission errors. Fixes https://github.com/ollama/ollama/issues/9082 --- <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-13 00:11:21 -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#12856