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:
parent
eaf9d9603d
commit
fd077bbf28
2 changed files with 4 additions and 0 deletions
2
build.sh
2
build.sh
|
@ -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)
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in a new issue