Skip to content

Commit 1a24f28

Browse files
committed
(core_utils) Fix listing internal mods: only *.sh
1 parent 60a3f93 commit 1a24f28

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

ChangeLog.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ Fixed:
1717

1818
* fix using backspace as first key-press in password prompt
1919
* fix unnecessary logging to a file named `log` when using `msu` in a shebang
20-
* fix listing external libraries, when directory at `${MSU_EXTERNAL_LIB}` does **not** exist
20+
* fix listing external modules, when directory at `${MSU_EXTERNAL_LIB}` does **not** exist
21+
* fix listing internal modules i.e. only list the `*.sh` files
2122

2223

2324
## [0.1.0][0.1.0] - 13/02/2016

lib/core_utils.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,8 @@ function list_modules() {
275275
# list internal modules, if allowed
276276
[[ "${internal}" == "true" ]] && {
277277
echo -e "\n${clr_white}internal modules${clr_reset}"
278-
output "$(ls "${MSU_LIB}")"
278+
# shellcheck disable=SC2010
279+
output "$(ls "${MSU_LIB}" | grep -E "\.sh$")"
279280
}
280281

281282
# list external modules, if allowed

test/test.core_utils.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,7 @@ function new_mod() {
180180
run list_modules
181181
echo "${output}" | grep "internal modules"
182182
echo "${output}" | grep "console"
183+
! echo "${output}" | grep "get-latest-version.py"
183184
echo "${output}" | grep "external modules"
184185
echo "${output}" | grep "a-stupid-module-ofcos"
185186
run list_modules --internal

0 commit comments

Comments
 (0)