mirror of
https://github.com/ivuorinen/dotfiles.git
synced 2026-02-10 08:47:28 +00:00
fix(shell): assign positional parameters to local variables
Replace direct $1/$2/$3 usage with named local variables in _log(), msg(), msg_err(), msg_done(), msg_run(), msg_ok(), and array_diff() (SonarCloud rule shelldre:S7679).
This commit is contained in:
@@ -43,10 +43,11 @@ done
|
||||
git config -f .gitmodules submodule.antidote.shallow true
|
||||
|
||||
_log() {
|
||||
local msg="$1"
|
||||
if command -v msgr > /dev/null 2>&1; then
|
||||
msgr run_done "$1"
|
||||
msgr run_done "$msg"
|
||||
else
|
||||
echo " [ok] $1"
|
||||
echo " [ok] $msg"
|
||||
fi
|
||||
return 0
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user