-
-
Notifications
You must be signed in to change notification settings - Fork 11.3k
Open
Labels
Description
Describe the issue:
When running spin lint on macOS, the command fails with the following error.
It seems that the grep command on macOS (BSD grep) does not support the -P option (Perl-compatible regex), which is available on GNU grep. This causes the linting step to break out of the box.
Lightning-AI/pytorch-lightning#19938 is a similar issue.
Reproduce the code example:
$ spin lint
Error message:
Running Ruff Check...
All checks passed!
Running C API borrow-reference linter...
grep: invalid option -- P
usage: grep [-abcdDEFGHhIiJLlMmnOopqRSsUVvwXxZz] [-A num] [-B num] [-C[num]]
[-e pattern] [-f file] [--binary-files=value] [--color=when]
[--context[=num]] [--directories=action] [--label] [--line-buffered]
[--null] [pattern] [file ...]
grep: invalid option -- P
usage: grep [-abcdDEFGHhIiJLlMmnOopqRSsUVvwXxZz] [-A num] [-B num] [-C[num]]
[-e pattern] [-f file] [--binary-files=value] [--color=when]
[--context[=num]] [--directories=action] [--label] [--line-buffered]
[--null] [pattern] [file ...]
...
Python and NumPy Versions:
commit hash: 622f874
Runtime Environment:
$ grep --version
grep (BSD grep, GNU compatible) 2.6.0-FreeBSD
Context for the issue:
No response