Compact find command in grafana-sidecar container.py
Use sh -c with implicit string concatenation to keep the find command readable as a single shell expression. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
b75c4f970b
commit
d1b62a38d5
1 changed files with 7 additions and 29 deletions
|
|
@ -34,35 +34,13 @@ async def build(src: dagger.Directory) -> dagger.Container:
|
|||
.with_exec([".venv/bin/pip", "install", "--no-cache-dir", "."])
|
||||
.with_exec(
|
||||
[
|
||||
"find",
|
||||
"/app/.venv",
|
||||
"(",
|
||||
"-type",
|
||||
"d",
|
||||
"-a",
|
||||
"-name",
|
||||
"test",
|
||||
"-o",
|
||||
"-name",
|
||||
"tests",
|
||||
")",
|
||||
"-o",
|
||||
"(",
|
||||
"-type",
|
||||
"f",
|
||||
"-a",
|
||||
"-name",
|
||||
"*.pyc",
|
||||
"-o",
|
||||
"-name",
|
||||
"*.pyo",
|
||||
")",
|
||||
"-exec",
|
||||
"rm",
|
||||
"-rf",
|
||||
"{}",
|
||||
"+",
|
||||
],
|
||||
"sh",
|
||||
"-c",
|
||||
"find /app/.venv"
|
||||
" \\( -type d -a -name test -o -name tests \\)"
|
||||
" -o \\( -type f -a -name '*.pyc' -o -name '*.pyo' \\)"
|
||||
" -exec rm -rf {} +",
|
||||
]
|
||||
)
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue