Adding a comment about the code that removes empty spaces from the arguments array but also breaks quoted arguments. We are picking the devil we know in this case.

This commit is contained in:
Livar Cunha 2016-07-12 11:23:34 -07:00
parent eaf9d9603d
commit fd077bbf28
2 changed files with 4 additions and 0 deletions

View file

@ -44,6 +44,8 @@ done
# $args array may have empty elements in it.
# The easiest way to remove them is to cast to string and back to array.
# This will actually break quoted arguments, arguments like
# -test "hello world" will be broken into three arguments instead of two, as it should.
temp="${args[@]}"
args=($temp)

View file

@ -75,6 +75,8 @@ done
# $args array may have empty elements in it.
# The easiest way to remove them is to cast to string and back to array.
# This will actually break quoted arguments, arguments like
# -test "hello world" will be broken into three arguments instead of two, as it should.
temp="${args[@]}"
args=($temp)