[PR #9088] [MERGED] llm: do not evaluate symlinks for exe path lookup #12855

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

📋 Pull Request Information

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

Base: mainHead: jmorganca/no-eval-symlink


📝 Commits (1)

  • 9edabdc llm: do not evaluate symlink for exe path

📊 Changes

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

View changed files

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

📄 Description

In some cases, the directories in the executable path read by filepath.EvalSymlinks are not accessible, resulting in permission errors which results in an error when running models. It also doesn't work well on long paths on windows, also resulting in errors. This change removes filepath.EvalSymlinks when accessing os.Executable() altogether

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


🔄 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/9088 **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/no-eval-symlink` --- ### 📝 Commits (1) - [`9edabdc`](https://github.com/ollama/ollama/commit/9edabdc18b6a43c1c2ba8ba8cfecc11beb31f816) llm: do not evaluate symlink for exe path ### 📊 Changes **2 files changed** (+0 additions, -10 deletions) <details> <summary>View changed files</summary> 📝 `discover/path.go` (+0 -5) 📝 `llm/server.go` (+0 -5) </details> ### 📄 Description In some cases, the directories in the executable path read by filepath.EvalSymlinks are not accessible, resulting in permission errors which results in an error when running models. It also doesn't work well on long paths on windows, also resulting in errors. This change removes filepath.EvalSymlinks when accessing os.Executable() altogether Fixes https://github.com/ollama/ollama/issues/9085 --- <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:19 -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#12855