mirror of
https://github.com/ivuorinen/dotfiles.git
synced 2026-03-19 03:01:57 +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:
@@ -51,8 +51,9 @@ install_fonts()
|
|||||||
{
|
{
|
||||||
msgr run "Starting to install NerdFonts..."
|
msgr run "Starting to install NerdFonts..."
|
||||||
# shellcheck disable=SC2048,SC2086
|
# shellcheck disable=SC2048,SC2086
|
||||||
./install.sh -q -s ${fonts[*]}
|
# shellcheck disable=SC2086
|
||||||
msgr run_done "Done"
|
./install.sh -q -s ${fonts[*]} \
|
||||||
|
&& msgr run_done "Done"
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -51,8 +51,8 @@ install_extensions()
|
|||||||
# Install all GitHub CLI extensions
|
# Install all GitHub CLI extensions
|
||||||
main()
|
main()
|
||||||
{
|
{
|
||||||
install_extensions
|
install_extensions \
|
||||||
msgr run_done "Done"
|
&& msgr run_done "Done"
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -35,5 +35,5 @@ install_libraries()
|
|||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
install_libraries
|
install_libraries \
|
||||||
msgr yay "Python library installations complete"
|
&& msgr yay "Python library installations complete"
|
||||||
|
|||||||
@@ -23,8 +23,8 @@ install_shellspec()
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
msgr run "Running make install..."
|
msgr run "Running make install..."
|
||||||
make -C "$SHELLSPEC_CACHE" install PREFIX="$HOME/.local"
|
make -C "$SHELLSPEC_CACHE" install PREFIX="$HOME/.local" \
|
||||||
msgr run_done "shellspec $version installed to $HOME/.local/bin/shellspec"
|
&& msgr run_done "shellspec $version installed to $HOME/.local/bin/shellspec"
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -15,8 +15,8 @@ clone_z_repo()
|
|||||||
local bin_path=$2
|
local bin_path=$2
|
||||||
|
|
||||||
if [[ ! -d "$bin_path" ]]; then
|
if [[ ! -d "$bin_path" ]]; then
|
||||||
git clone "$git_path" "$bin_path"
|
git clone "$git_path" "$bin_path" \
|
||||||
msgr run_done "z installed at $bin_path"
|
&& msgr run_done "z installed at $bin_path"
|
||||||
else
|
else
|
||||||
msgr ok "z ($bin_path/) already installed"
|
msgr ok "z ($bin_path/) already installed"
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user