mirror of
https://github.com/tests-always-included/mo.git
synced 2024-12-18 16:27:52 +00:00
Making work in strict mode and fixing len bug
This commit is contained in:
parent
0ca9970b58
commit
4ccfaf9d79
8
mo
8
mo
@ -93,7 +93,7 @@ mo() (
|
|||||||
|
|
||||||
*)
|
*)
|
||||||
# Every arg that is not a flag or a option should be a file
|
# Every arg that is not a flag or a option should be a file
|
||||||
files=("${files[@]}" "$arg")
|
files=(${files[@]+"${files[@]}"} "$arg")
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
@ -257,8 +257,8 @@ moIndentLines() {
|
|||||||
result=""
|
result=""
|
||||||
|
|
||||||
#: Remove the period from the end of the string.
|
#: Remove the period from the end of the string.
|
||||||
len=$((${#content} - 1))
|
len=$((${#3} - 1))
|
||||||
content=${3:0:len}
|
content=${3:0:$len}
|
||||||
|
|
||||||
if [[ -z "${2-}" ]]; then
|
if [[ -z "${2-}" ]]; then
|
||||||
local "$1" && moIndirect "$1" "$content"
|
local "$1" && moIndirect "$1" "$content"
|
||||||
@ -857,7 +857,7 @@ moTest() {
|
|||||||
[[ -n "${MO_FALSE_IS_EMPTY-}" ]] && [[ "${!1-}" == "false" ]] && return 1
|
[[ -n "${MO_FALSE_IS_EMPTY-}" ]] && [[ "${!1-}" == "false" ]] && return 1
|
||||||
|
|
||||||
# Environment variables must not be empty
|
# Environment variables must not be empty
|
||||||
[[ -n "${!1}" ]] && return 0
|
[[ -n "${!1-}" ]] && return 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
return 1
|
return 1
|
||||||
|
Loading…
Reference in New Issue
Block a user