Skip to content

Commit 1aff92f

Browse files
authored
build: fix container-based linting in devtasks script
1 parent 09ed738 commit 1aff92f

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

devtasks.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"""Development helper tasks."""
22

33
import logging
4+
import shlex
45
from pathlib import Path
56

67
from plumbum import TEE, CommandNotFound, ProcessExecutionError, local
@@ -24,7 +25,7 @@ def lint() -> None:
2425
"--accept-flake-config",
2526
"develop",
2627
"--impure",
27-
HERE,
28+
f"{HERE}",
2829
"--command",
2930
"pre-commit",
3031
"run",
@@ -45,8 +46,9 @@ def lint() -> None:
4546
f"--volume={HERE}:{HERE}:rw,z",
4647
f"--workdir={HERE}",
4748
"docker.io/nixos/nix",
48-
"nix",
49-
args,
49+
"bash",
50+
"-c",
51+
f"git config --global --add safe.directory {HERE} && {shlex.join(['nix', *args])}",
5052
]
5153
& TEE
5254
)

0 commit comments

Comments
 (0)