Skip to content

Commit

Permalink
Allow optional space in shebang
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelAquilina authored and molovo committed Jul 11, 2017
1 parent d338dee commit 792f96d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/commands/run.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ function _zunit_parse_argument() {
line=$(cat $argument | head -n 1)

# Check for the zunit shebang
if [[ $line = "#!/usr/bin/env zunit" ]]; then
if [[ $line =~ "#! ?/usr/bin/env zunit" ]]; then
# Add it to the array
testfiles[(( ${#testfiles} + 1 ))]=("$argument${test_name+"@$test_name"}")
return
Expand Down
2 changes: 1 addition & 1 deletion tests/assertions/exists.zunit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env zunit
#! /usr/bin/env zunit

@test 'Test _zunit_assert_exists success' {
run assert './exists.zunit' exists
Expand Down

0 comments on commit 792f96d

Please sign in to comment.