build: fix container-based linting in devtasks script

This commit is contained in:
Sigurd Spieckermann 2025-04-25 08:58:14 +02:00 committed by GitHub
parent 09ed738471
commit 1aff92f9f5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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
) )