mirror of
https://github.com/ivuorinen/dotfiles.git
synced 2026-03-19 04:06:08 +00:00
fix: guard success messages on command exit status
- Source x-path instead of capturing empty stdout via command substitution - Validate --dry-run argument in cleanup script, reject unknown flags - Gate success messages on preceding command's exit status with && - Applies to dfm (fmt, reset_nvim, shfmt) and install scripts (fonts, gh-extensions, python-packages, shellspec, z)
This commit is contained in:
@@ -12,7 +12,15 @@ fi
|
||||
# shellcheck source=shared.sh
|
||||
source "$DOTFILES/config/shared.sh"
|
||||
|
||||
DRY_RUN="${1:-}"
|
||||
DRY_RUN=""
|
||||
if [[ $# -gt 0 ]]; then
|
||||
if [[ "$1" = "--dry-run" ]]; then
|
||||
DRY_RUN="--dry-run"
|
||||
else
|
||||
echo "Usage: $0 [--dry-run]" >&2
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
remove_dir()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user