diff options
author | Todd Gamblin <tgamblin@llnl.gov> | 2024-07-24 10:11:32 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-24 08:11:32 -0700 |
commit | a841ddd00c1600662f3f42646d61dd0b34dfb7e4 (patch) | |
tree | f857766edc4500f41fc42d014c74e296585a1c48 /.flake8 | |
parent | 39455768b256f8b93c17d4fde18efdd099d18eee (diff) | |
download | spack-a841ddd00c1600662f3f42646d61dd0b34dfb7e4.tar.gz spack-a841ddd00c1600662f3f42646d61dd0b34dfb7e4.tar.bz2 spack-a841ddd00c1600662f3f42646d61dd0b34dfb7e4.tar.xz spack-a841ddd00c1600662f3f42646d61dd0b34dfb7e4.zip |
`spack pkg grep`: don't warn when grepping for quoted strings (#45412)
The `Executable` class emits a warning when you pass quoted arguments to it:
```
> spack pkg grep '"namespace"'
==> Warning: Quotes in command arguments can confuse scripts like configure.
The following arguments may cause problems when executed:
"namespace"
Quotes aren't needed because spack doesn't use a shell. Consider removing them.
If multiple levels of quotation are required, use `ignore_quotes=True`.
```
This is to warn new package authors who aren't used to calling build commands in python.
It's not useful for `spack pkg grep`, where we really are passing args on the command
line, and if we pass a quoted string, we probably meant to.
- [x] make `ignore_quotes` an instance variable, not just an argument to ``__call__`
- [x] set `ignore_quotes` to `True` in `spack pkg grep`
Signed-off-by: Todd Gamblin <tgamblin@llnl.gov>
Diffstat (limited to '.flake8')
0 files changed, 0 insertions, 0 deletions