Skip to content

Commit

Permalink
Minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
ale5000-git committed Oct 10, 2024
1 parent b8a4ff8 commit 72acd66
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/scripts-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,14 @@ jobs:
shell: bash
run: |
# Testing scripts...
EXIT_CODE='0'
SKIP_BASH='false'
if diff 1> /dev/null 2>&1 -- "$(command -v 'sh' || :)" "$(command -v 'bash' || :)"; then SKIP_BASH='true'; fi
# shellcheck disable=SC2016 # Intended: Expressions don't expand in single quotes
readonly current_os='${{ matrix.os }}'; readonly workspace_dir='${{ github.workspace }}'
{
readonly current_os='${{ matrix.os }}'
readonly workspace_dir='${{ github.workspace }}'
}
if command 1> /dev/null -v 'apt-get'; then sudo apt-get -y -qq install 'mksh' 'yash' 'posh' 1> /dev/null; fi
if command 1> /dev/null -v 'brew'; then brew 1> /dev/null install --quiet 'oils-for-unix' 'mksh' 'yash'; fi
#
Expand All @@ -53,6 +59,7 @@ jobs:
}
skip()
{
if test "${SKIP_BASH:?}" = 'true' && test "${2:?}" = 'bash'; then return 0; fi
if test "${1:?}" = 'cmdline.sh'; then
case "${2:?}" in
sh | busybox | dash | ksh | mksh | zsh | yash | posh) return 0 ;;
Expand All @@ -78,7 +85,6 @@ jobs:
printf '\nRETURN CODE:%s\n\n' "${_status:?}"
done
}
EXIT_CODE='0'
export ONLY_FOR_TESTING='true'
for _script in 'tools/bits-info.sh' 'cmdline.sh'; do
test_on_all_shells "${_script:?}"
Expand Down
2 changes: 1 addition & 1 deletion includes/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1154,7 +1154,7 @@ detect_bb_and_id()
if test "${PLATFORM:?}" = 'win' && test "${IS_BUSYBOX:?}" = 'true' && test -n "${SHELL_EXE?}"; then
BB_CMD="${SHELL_EXE:?}"
else
BB_CMD="$(command -v busybox)" || BB_CMD=''
BB_CMD="$(command 2> /dev/null -v busybox)" || BB_CMD=''
fi

if test "${PLATFORM:?}" = 'win' && test -n "${BB_CMD?}"; then
Expand Down

0 comments on commit 72acd66

Please sign in to comment.