[PR #15522] app: check user's login shell PATH before prompting for CLI symlink install #77478

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

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/15522
Author: @LH-and-FPGA
Created: 4/12/2026
Status: 🔄 Open

Base: mainHead: main


📝 Commits (2)

  • 14c8428 app: check user's login shell PATH before prompting for CLI symlink install
  • 34dd5c6 Merge branch 'ollama:main' into main

📊 Changes

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

View changed files

📝 app/cmd/app/app_darwin.go (+15 -0)

📄 Description

Fixes #15521

Summary

  • On macOS, GUI apps don't inherit environment variables from shell config files (.zshrc/.bashrc), so exec.LookPath("ollama") always fails in a GUI context
  • This causes the app to unconditionally prompt for admin credentials to create a /usr/local/bin/ollama symlink, even when the user has already configured ollama in their shell PATH
  • When LookPath finds nothing, fall back to querying the user's login shell ($SHELL -l -c "command -v ollama") with a 5-second timeout before resorting to the admin password prompt

🔄 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/15522 **Author:** [@LH-and-FPGA](https://github.com/LH-and-FPGA) **Created:** 4/12/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `main` --- ### 📝 Commits (2) - [`14c8428`](https://github.com/ollama/ollama/commit/14c8428e8a7ceb0e75e6aebd0971dd438b2e735f) app: check user's login shell PATH before prompting for CLI symlink install - [`34dd5c6`](https://github.com/ollama/ollama/commit/34dd5c67e51afc699622fb91a0372f9acb7166b9) Merge branch 'ollama:main' into main ### 📊 Changes **1 file changed** (+15 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `app/cmd/app/app_darwin.go` (+15 -0) </details> ### 📄 Description Fixes #15521 ## Summary - On macOS, GUI apps don't inherit environment variables from shell config files (`.zshrc`/`.bashrc`), so `exec.LookPath("ollama")` always fails in a GUI context - This causes the app to unconditionally prompt for admin credentials to create a `/usr/local/bin/ollama` symlink, even when the user has already configured `ollama` in their shell PATH - When `LookPath` finds nothing, fall back to querying the user's login shell (`$SHELL -l -c "command -v ollama"`) with a 5-second timeout before resorting to the admin password prompt --- <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:08:41 -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#77478