Conversation
|
|
||
|
|
||
|
|
||
| git config --global user.name "Bruno Bergher" |
There was a problem hiding this comment.
The aliases file sets global Git config on shell startup by running git config --global user.name ... and git config --global user.email .... This will execute every time a shell is sourced and may unexpectedly modify global config or slow shell startup. Consider removing these lines from aliases/git.sh and placing them into bootstrap.sh behind a guard so they run once during bootstrap. Example:\n\nif ! git config --global user.name >/dev/null 2>&1; then\n git config --global user.name "Bruno Bergher"\nfi\nif ! git config --global user.email >/dev/null 2>&1; then\n git config --global user.email "me@brunobergher.com"\nfi\n
| fi; | ||
| fi; | ||
| unset doIt; | ||
| rsync --exclude ".git/" \ |
There was a problem hiding this comment.
The updated bootstrap.sh removes the interactive confirmation and the --force/-f guard, and now runs rsync non-interactively with its output redirected to /dev/null. This is a behavioral change that can silently overwrite user files and hide errors. Recommend restoring an explicit confirmation or a --yes/--force flag, and avoid redirecting rsync output to /dev/null so failures are visible. Also sourcing ~/.zshrc from a Bash script can have unintended side-effects; consider using exec zsh -lc 'source ~/.zshrc' or instructing the user to restart their shell instead.
Suggested minimal actions:
- Reintroduce a
--force/ prompt flow so the default is safe. - Remove
> /dev/nullso rsync errors surface (or redirect only stdout, keep stderr visible). - Do not source
~/.zshrcfrom bash; either spawn zsh or ask the user to restart their shell.
|
|
||
|
|
||
|
|
||
| git config --global user.name "Bruno Bergher" |
There was a problem hiding this comment.
The two lines at the end of aliases/git.sh run git config --global ... every time a shell starts because this file is sourced from ~/.zshrc. That can slow shell startup, repeatedly write global config, and unexpectedly overwrite a user's settings. Move these setup commands to the bootstrap/setup workflow (run once), or guard them with a conditional check (e.g. check git config --global --get user.name before setting) so they don't execute on every shell source.
| alias ....="cd ../../.." | ||
| alias .....="cd ../../../.." | ||
| alias dev='cd ~/dev' | ||
| alias dev="cd ~/dev " |
There was a problem hiding this comment.
The alias alias dev="cd ~/dev " in aliases/cli.sh contains a trailing space inside the quoted command. That trailing space becomes part of the executed command and can lead to unexpected behavior (the extra space will be passed to the shell when the alias expands). Remove the trailing space so it reads alias dev="cd ~/dev".
| fi; | ||
| fi; | ||
| unset doIt; | ||
| rsync --exclude ".git/" \ |
There was a problem hiding this comment.
This updated bootstrap.sh removes the interactive confirmation and the doIt wrapper, making the script run rsync non-interactively and silencing its output by redirecting to /dev/null. Two issues: 1) Removing the confirmation increases the risk of accidental overwrites when a user runs this script. 2) Redirecting output to /dev/null hides rsync errors and progress that could help diagnose failures. Recommend restoring a safe interactive prompt (or --force flag) and keeping stderr at least (e.g. > /dev/null 2>&1 -> > /dev/null is worse; instead consider --quiet or redirect only stdout while leaving stderr), or document that this script is destructive and will run without prompt.
Review SummaryI've reviewed the changes in this PR. Here are the issues that need to be addressed:
Please address these issues before merging. |
|
PR Review TODOs:
|
| alias ....="cd ../../.." | ||
| alias .....="cd ../../../.." | ||
| alias dev='cd ~/dev' | ||
| alias dev="cd ~/dev " |
There was a problem hiding this comment.
The alias contains a trailing space inside the quoted command, which becomes part of the executed command and may cause unexpected behavior. Remove the trailing space so the alias expands cleanly.
| alias dev="cd ~/dev " | |
| alias dev="cd ~/dev" |
|
|
||
|
|
||
|
|
||
| git config --global user.name "Bruno Bergher" |
There was a problem hiding this comment.
This file is sourced on every shell startup via .zshrc, so running global Git config here will execute each time and may overwrite user preferences or slow startup. Move these to the bootstrap flow and guard them (e.g., only set if unset) so they run once.
| --exclude "bootstrap.sh" \ | ||
| --exclude "README.md" \ | ||
| --exclude "LICENSE-MIT.txt" \ | ||
| -avh --no-perms . ~ > /dev/null; |
There was a problem hiding this comment.
Redirecting rsync output to /dev/null hides failures and makes troubleshooting harder. Keep errors visible (or avoid silencing altogether) so problems surface during bootstrap.
| -avh --no-perms . ~ > /dev/null; | |
| -avh --no-perms . ~; |
| --exclude "README.md" \ | ||
| --exclude "LICENSE-MIT.txt" \ | ||
| -avh --no-perms . ~ > /dev/null; | ||
| source ~/.zshrc; |
There was a problem hiding this comment.
Sourcing ~/.zshrc from a non-interactive bash script can cause unintended side effects and mixes shells. Prefer not to source it here; ask the user to start a new terminal session (or, if absolutely needed, exec zsh in a controlled subshell).
|
PR review TODOs for #2
|
| alias ....="cd ../../.." | ||
| alias .....="cd ../../../.." | ||
| alias dev='cd ~/dev' | ||
| alias dev="cd ~/dev " |
There was a problem hiding this comment.
The alias contains a trailing space inside the quoted command, which becomes part of the executed command and can cause unexpected behavior. Remove the trailing space so the alias expands cleanly.
| alias dev="cd ~/dev " | |
| alias dev="cd ~/dev" |
| git config --global user.name "Bruno Bergher" | ||
| git config --global user.email me@brunobergher.com No newline at end of file |
There was a problem hiding this comment.
Running global Git config in an aliases file will execute on every shell startup (this file is sourced by .zshrc). This can repeatedly overwrite user preferences and adds overhead. Guard these calls (or move them to bootstrap.sh to run once during setup).
| git config --global user.name "Bruno Bergher" | |
| git config --global user.email me@brunobergher.com | |
| if ! git config --global user.name >/dev/null 2>&1; then | |
| git config --global user.name "Bruno Bergher" | |
| fi | |
| if ! git config --global user.email >/dev/null 2>&1; then | |
| git config --global user.email "me@brunobergher.com" | |
| fi |
| --exclude "bootstrap.sh" \ | ||
| --exclude "README.md" \ | ||
| --exclude "LICENSE-MIT.txt" \ | ||
| -avh --no-perms . ~ > /dev/null; |
There was a problem hiding this comment.
Redirecting rsync output to /dev/null hides failures and makes troubleshooting harder. Keep errors visible (or avoid silencing altogether) so problems surface during bootstrap.
| --exclude "README.md" \ | ||
| --exclude "LICENSE-MIT.txt" \ | ||
| -avh --no-perms . ~ > /dev/null; | ||
| source ~/.zshrc; |
There was a problem hiding this comment.
Sourcing ~/.zshrc from a non-interactive bash script can cause unintended side effects and mixes shells. Prefer not to source it here; ask the user to restart their shell (or exec zsh in a controlled subshell). Replacing this line with a comment avoids side effects.
| source ~/.zshrc; | |
| # Do not source ~/.zshrc here; restart your terminal session instead |
Review SummaryI've reviewed the changes in this PR and identified the following issues that should be addressed: Issues to Fix
|
No description provided.