Conversation
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request adds support for Raspberry Pi and other Debian-based systems, including a new installation script and updates to the .zshrc to handle different Linux distributions. The changes are well-structured and improve the robustness of the dotfiles by adding guards for commands and plugins. I've found a couple of areas for improvement: a minor security enhancement in the installation script and a fix to ensure user-installed binaries are permanently added to the PATH.
| fi | ||
| fi | ||
|
|
||
| export PATH="$HOME/.local/bin:$PATH" |
There was a problem hiding this comment.
This export only sets the PATH for the current script's execution. Tools installed into $HOME/.local/bin (such as uv and any tools it installs, like commitizen) will not be available in new shell sessions. To make them permanently available, $HOME/.local/bin should be prepended to the PATH in your .zshrc file.
| else | ||
| echo ">>> eza not available via apt, installing from third-party apt repository <<<" | ||
| sudo install -d -m 0755 /etc/apt/keyrings | ||
| wget -qO- https://raw.githubusercontent.com/eza-community/eza/main/deb.asc | sudo gpg --dearmor -o /etc/apt/keyrings/gierens.gpg |
There was a problem hiding this comment.
Piping from wget to a command running with sudo is a security risk. A man-in-the-middle attack on the download could lead to arbitrary code execution with root privileges. It's safer to run as much of the pipe as possible with user privileges and only use sudo for the final file write. The suggested change uses sudo tee to achieve this, which is a more secure pattern.
| wget -qO- https://raw.githubusercontent.com/eza-community/eza/main/deb.asc | sudo gpg --dearmor -o /etc/apt/keyrings/gierens.gpg | |
| wget -qO- https://raw.githubusercontent.com/eza-community/eza/main/deb.asc | gpg --dearmor | sudo tee /etc/apt/keyrings/gierens.gpg >/dev/null |
Summary