Skip to content

Commit

Permalink
More forgiving ignore option
Browse files Browse the repository at this point in the history
Thanks for this amazing package 🚀
I ran into a problem when I using `--ignore="table1, table2, ...` because of the exploding does not allow whitespace. How about changing that to a more forgiving `preg_split`?

Example:
```
$list = "a, b,c d";

preg_split('/[,\s]+/', $list);

```

This might be implemented in other places as well.
  • Loading branch information
ajthinking authored Apr 3, 2020
1 parent dab2a84 commit c896b3c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ protected function getExcludedTables()
$excludes = ['migrations'];
$ignore = $this->option('ignore');
if ( ! empty($ignore)) {
return array_merge($excludes, explode(',', $ignore));
return array_merge($excludes, preg_split('/[,\s]+/', ignore));
}

return $excludes;
Expand Down

0 comments on commit c896b3c

Please sign in to comment.