fix(shell): add explicit return statements to functions

Add return 0 as the last statement in ~46 shell functions across
17 files that previously relied on implicit return codes
(SonarCloud rule shelldre:S7682).
This commit is contained in:
2026-02-07 14:00:58 +02:00
parent 63a21d08b4
commit 473fc820b9
17 changed files with 48 additions and 0 deletions

View File

@@ -23,6 +23,7 @@ clone_or_update_repo()
fi
cd "$TMP_PATH" || { msgr err "No such folder $TMP_PATH"; exit 1; }
return 0
}
# Function to add fonts to sparse-checkout
@@ -38,6 +39,7 @@ add_fonts_to_sparse_checkout()
git sparse-checkout add "patched-fonts/$font"
echo ""
done
return 0
}
# Function to install NerdFonts
@@ -47,11 +49,13 @@ install_fonts()
# shellcheck disable=SC2048,SC2086
./install.sh -q -s ${fonts[*]}
msgr run_done "Done"
return 0
}
remove_tmp_path()
{
rm -rf "$TMP_PATH"
return 0
}
main()
@@ -60,6 +64,7 @@ main()
add_fonts_to_sparse_checkout
install_fonts
remove_tmp_path
return 0
}
main "$@"