fix: make dev tools executable

This commit is contained in:
2026-07-20 20:55:57 +02:00
parent cb2301d709
commit 0af5a8b00f
3 changed files with 19 additions and 5 deletions
+2 -3
View File
@@ -55,19 +55,18 @@ class DevelopmentEnvironment:
) from exc
if resolved.parent != self.scripts_dir.resolve() or not resolved.is_file():
raise DevelopmentEnvironmentError(f"Install script {name!r} is not a regular file")
if not os.access(resolved, os.X_OK):
raise DevelopmentEnvironmentError(f"Install script {name!r} is not executable")
return resolved
async def _run(self, name: str, script: Path, workspace: Path) -> None:
started = monotonic()
command = [str(script)] if os.access(script, os.X_OK) else ["/bin/sh", str(script)]
log.info(
"development install script started",
extra={"operation": "development.install", "script": name},
)
try:
process = await asyncio.create_subprocess_exec(
str(script),
*command,
cwd=workspace,
env=self._environment(),
stdout=asyncio.subprocess.PIPE,