Skip to content

Commit

Permalink
Adding a comment about the code that removes empty spaces from the ar…
Browse files Browse the repository at this point in the history
…guments array but also breaks quoted arguments. We are picking the devil we know in this case.
  • Loading branch information
livarcocc committed Jul 12, 2016
1 parent eaf9d96 commit fd077bb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
2 changes: 2 additions & 0 deletions run-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit fd077bb

Please sign in to comment.