Skip to content

Commit fd077bb

Browse files
committed
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.
1 parent eaf9d96 commit fd077bb

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

build.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ done
4444

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

run-build.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,8 @@ done
7575

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

0 commit comments

Comments
 (0)