mirror of
https://github.com/copier-org/copier.git
synced 2025-05-05 15:32:54 +00:00
build: fix container-based linting in devtasks script
This commit is contained in:
parent
09ed738471
commit
1aff92f9f5
@ -1,6 +1,7 @@
|
|||||||
"""Development helper tasks."""
|
"""Development helper tasks."""
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
|
import shlex
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
from plumbum import TEE, CommandNotFound, ProcessExecutionError, local
|
from plumbum import TEE, CommandNotFound, ProcessExecutionError, local
|
||||||
@ -24,7 +25,7 @@ def lint() -> None:
|
|||||||
"--accept-flake-config",
|
"--accept-flake-config",
|
||||||
"develop",
|
"develop",
|
||||||
"--impure",
|
"--impure",
|
||||||
HERE,
|
f"{HERE}",
|
||||||
"--command",
|
"--command",
|
||||||
"pre-commit",
|
"pre-commit",
|
||||||
"run",
|
"run",
|
||||||
@ -45,8 +46,9 @@ def lint() -> None:
|
|||||||
f"--volume={HERE}:{HERE}:rw,z",
|
f"--volume={HERE}:{HERE}:rw,z",
|
||||||
f"--workdir={HERE}",
|
f"--workdir={HERE}",
|
||||||
"docker.io/nixos/nix",
|
"docker.io/nixos/nix",
|
||||||
"nix",
|
"bash",
|
||||||
args,
|
"-c",
|
||||||
|
f"git config --global --add safe.directory {HERE} && {shlex.join(['nix', *args])}",
|
||||||
]
|
]
|
||||||
& TEE
|
& TEE
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user