Skip to content
This repository was archived by the owner on Nov 29, 2018. It is now read-only.

Commit 8e58a9b

Browse files
Merge pull request #14 from Billiam/bugfix/whitespace-support
Allow environment variables to contain whitespace
2 parents 32b6c20 + c16420c commit 8e58a9b

File tree

3 files changed

+15
-1
lines changed

3 files changed

+15
-1
lines changed

src/circleci-matrix.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ process_envs() {
158158
info "Env: $line"
159159
print_horizontal_rule
160160

161-
process_commands $line
161+
process_commands "$line"
162162
info ""
163163
fi
164164
((i=i+1))

tests/run.bats

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,3 +214,11 @@ circleci-matrix() {
214214
run circleci-matrix --config invalid-config.yml
215215
echo $output | grep "ERROR: No invalid-config.yml file found!"
216216
}
217+
218+
@test "should support spaces in single quoted variables" {
219+
circleci-matrix --config whitespace_support.yml | grep "^double quoted$"
220+
}
221+
222+
@test "should support spaces in double quoted variables" {
223+
circleci-matrix --config whitespace_support.yml | grep "^single quoted$"
224+
}

tests/whitespace_support.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
env:
2+
- VERSION="double quoted"
3+
- VERSION='single quoted'
4+
5+
command:
6+
- echo "$VERSION"

0 commit comments

Comments
 (0)