Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions home-manager/programs/neovim/nvim-pack-lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@
"rev": "2d7c2db2507fa3c4956142ee607431ddb2828639",
"src": "https://github.com/stevearc/dressing.nvim"
},
"fff.nvim": {
"rev": "9edf195c8fe71f1ab8f84e863fb27b469d2342bf",
"src": "https://github.com/dmtrKovalenko/fff.nvim"
},
Comment on lines +68 to +71

Copilot AI Dec 6, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The lazygit.nvim and vscode-diff.nvim plugins are referenced in lua/plugins.lua (lines 93-94) and lua/keymaps.lua (lines 121, 123-125), but they are missing from this lock file. This will cause runtime errors when trying to use the keymaps. These plugins need to be added to the lock file with their respective repository URLs and commit hashes.

Copilot uses AI. Check for mistakes.
"fidget.nvim": {
"rev": "e32b672d8fd343f9d6a76944fedb8c61d7d8111a",
"src": "https://github.com/j-hui/fidget.nvim"
Expand Down
2 changes: 1 addition & 1 deletion home-manager/services/brew-upgrader/upgrade.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

set -euo pipefail

brew upgrade
/opt/homebrew/bin/brew upgrade

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Hardcoding the path to the brew executable to /opt/homebrew/bin/brew makes this script specific to Apple Silicon Macs and will cause it to fail on Intel-based Macs where Homebrew is typically installed in /usr/local/bin. To make the script more portable across different architectures, it's better to dynamically determine the path to the brew executable.

Suggested change
/opt/homebrew/bin/brew upgrade
if [ -x "/opt/homebrew/bin/brew" ]; then
/opt/homebrew/bin/brew upgrade
elif [ -x "/usr/local/bin/brew" ]; then
/usr/local/bin/brew upgrade
else
echo "Error: Homebrew not found" >&2
exit 1
fi

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

Homebrew path is hardcoded to Apple Silicon Macs only.

The absolute path /opt/homebrew/bin/brew only works on Apple Silicon Macs. Intel Macs use /usr/local/bin/brew, and the script will fail silently on unsupported architectures due to set -e. This breaks portability.

Consider using a more robust approach that detects the correct Homebrew path:

-/opt/homebrew/bin/brew upgrade
+if command -v brew &> /dev/null; then
+  brew upgrade
+else
+  echo "Error: brew not found in PATH" >&2
+  exit 1
+fi

Alternatively, if the script is intentionally Apple Silicon-only, document this constraint clearly in a comment or README.

🤖 Prompt for AI Agents
In home-manager/services/brew-upgrader/upgrade.sh around line 5, the script
hardcodes /opt/homebrew/bin/brew which only exists on Apple Silicon and will
fail on Intel Macs; replace the hardcoded path with logic that locates Homebrew
dynamically (e.g., use command -v brew or check common locations like
/opt/homebrew/bin/brew and /usr/local/bin/brew) and fail with a clear error if
not found, or if the script is intended to be Apple Silicon–only, add a top-line
comment and README note documenting that constraint.

@cubic-dev-ai cubic-dev-ai Bot Dec 6, 2025 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P3: Hardcoded Homebrew path is specific to Apple Silicon Macs. On Intel Macs, Homebrew is at /usr/local/bin/brew. Consider using a conditional or checking for the path existence, though this may be intentional if only targeting ARM Macs.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At home-manager/services/brew-upgrader/upgrade.sh, line 5:

<comment>Hardcoded Homebrew path is specific to Apple Silicon Macs. On Intel Macs, Homebrew is at `/usr/local/bin/brew`. Consider using a conditional or checking for the path existence, though this may be intentional if only targeting ARM Macs.</comment>

<file context>
@@ -2,4 +2,4 @@
 set -euo pipefail
 
-brew upgrade
+/opt/homebrew/bin/brew upgrade
</file context>
Suggested change
/opt/homebrew/bin/brew upgrade
BREW_PATH="/opt/homebrew/bin/brew"
[ -x "$BREW_PATH" ] || BREW_PATH="/usr/local/bin/brew"
"$BREW_PATH" upgrade
Fix with Cubic

Copilot AI Dec 6, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The hardcoded path /opt/homebrew/bin/brew only works on Apple Silicon Macs. Intel Macs install Homebrew to /usr/local/bin/brew.

Consider using a fallback pattern like other scripts in this codebase:

if [ -x /opt/homebrew/bin/brew ]; then
  /opt/homebrew/bin/brew upgrade
elif [ -x /usr/local/bin/brew ]; then
  /usr/local/bin/brew upgrade
else
  echo "brew binary not found" >&2
  exit 1
fi

This pattern is used in home-manager/services/ollama/default.nix:11-14 and home-manager/services/cliproxyapi/start.sh:33-36.

Suggested change
/opt/homebrew/bin/brew upgrade
if [ -x /opt/homebrew/bin/brew ]; then
/opt/homebrew/bin/brew upgrade
elif [ -x /usr/local/bin/brew ]; then
/usr/local/bin/brew upgrade
else
echo "brew binary not found" >&2
exit 1
fi

Copilot uses AI. Check for mistakes.

Copilot AI Dec 6, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The hardcoded path /opt/homebrew/bin/brew assumes Homebrew is installed at the default Apple Silicon location. This will fail on Intel Macs where Homebrew is at /usr/local/bin/brew. Consider checking both locations or using the PATH from the launchd agent configuration which already includes both paths.

Suggested change
/opt/homebrew/bin/brew upgrade
PATH="/opt/homebrew/bin:/usr/local/bin:$PATH"
brew upgrade

Copilot uses AI. Check for mistakes.
Loading