${@:+$@} -> ${@}

This commit is contained in:
NorseGaud 2022-03-08 18:30:29 -05:00
parent 1ab8ea96b2
commit 66cf4f3a54
No known key found for this signature in database
GPG key ID: FC3D2A556A94E721
2 changed files with 6 additions and 6 deletions

View file

@ -146,7 +146,7 @@ function _run_in_new_container
${CRI} run --rm "${USE_TTY}" \ ${CRI} run --rm "${USE_TTY}" \
-v "${CONFIG_PATH}:${DMS_CONFIG}${USE_SELINUX}" \ -v "${CONFIG_PATH}:${DMS_CONFIG}${USE_SELINUX}" \
"${IMAGE_NAME}" "${@:+$@}" "${IMAGE_NAME}" "${@}"
} }
function _main function _main
@ -226,9 +226,9 @@ function _main
if [[ -n ${CONTAINER_NAME} ]] if [[ -n ${CONTAINER_NAME} ]]
then then
${CRI} exec "${USE_TTY}" "${CONTAINER_NAME}" setup "${@:+$@}" ${CRI} exec "${USE_TTY}" "${CONTAINER_NAME}" setup "${@}"
else else
_run_in_new_container setup "${@:+$@}" _run_in_new_container setup "${@}"
fi fi
[[ ${1} == 'help' ]] && _show_local_usage [[ ${1} == 'help' ]] && _show_local_usage
@ -236,4 +236,4 @@ function _main
return 0 return 0
} }
_main "${@:+$@}" _main "${@}"

View file

@ -52,7 +52,7 @@ function __log_success
function __in_path function __in_path
{ {
command -v "${@:+$@}" &>/dev/null && return 0 ; return 1 ; command -v "${@}" &>/dev/null && return 0 ; return 1 ;
} }
function _eclint function _eclint
@ -156,4 +156,4 @@ function __main
esac esac
} }
__main "${@:+$@}" || exit ${?} __main "${@}" || exit ${?}