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
|
||||
files=("${files[@]}" "$arg")
|
||||
files=(${files[@]+"${files[@]}"} "$arg")
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
@ -257,8 +257,8 @@ moIndentLines() {
|
||||
result=""
|
||||
|
||||
#: Remove the period from the end of the string.
|
||||
len=$((${#content} - 1))
|
||||
content=${3:0:len}
|
||||
len=$((${#3} - 1))
|
||||
content=${3:0:$len}
|
||||
|
||||
if [[ -z "${2-}" ]]; then
|
||||
local "$1" && moIndirect "$1" "$content"
|
||||
@ -857,7 +857,7 @@ moTest() {
|
||||
[[ -n "${MO_FALSE_IS_EMPTY-}" ]] && [[ "${!1-}" == "false" ]] && return 1
|
||||
|
||||
# Environment variables must not be empty
|
||||
[[ -n "${!1}" ]] && return 0
|
||||
[[ -n "${!1-}" ]] && return 0
|
||||
fi
|
||||
|
||||
return 1
|
||||
|
Loading…
Reference in New Issue
Block a user