3 Commits

Author SHA1 Message Date
Sovran_Systems a18ef1447a Merge pull request #166 from naturallaw777/copilot/fix-subprocess-command-paths
[WIP] Fix subprocess command paths in verify-integrity endpoint
2026-04-08 21:08:58 -05:00
copilot-swe-agent[bot] ecfd2e9f51 fix: use absolute paths for nix and nixos-rebuild in verify-integrity endpoint
Agent-Logs-Url: https://github.com/naturallaw777/staging_alpha/sessions/7de38316-a649-4395-bfb4-c12a07741078

Co-authored-by: naturallaw777 <99053422+naturallaw777@users.noreply.github.com>
2026-04-09 02:08:29 +00:00
copilot-swe-agent[bot] f8bdc1cb15 Initial plan 2026-04-09 02:06:47 +00:00
+2 -2
View File
@@ -3068,7 +3068,7 @@ async def api_security_verify_integrity():
store_errors: list[str] = [] store_errors: list[str] = []
try: try:
result = subprocess.run( result = subprocess.run(
["nix", "store", "verify", "--all", "--no-trust"], ["/run/current-system/sw/bin/nix", "store", "verify", "--all", "--no-trust"],
capture_output=True, text=True, timeout=300, capture_output=True, text=True, timeout=300,
) )
combined = (result.stdout + result.stderr).strip() combined = (result.stdout + result.stderr).strip()
@@ -3088,7 +3088,7 @@ async def api_security_verify_integrity():
try: try:
current_system_path = os.path.realpath("/run/current-system") current_system_path = os.path.realpath("/run/current-system")
result = subprocess.run( result = subprocess.run(
["nixos-rebuild", "build", "--flake", "/etc/nixos", "--no-build-output"], ["/run/current-system/sw/bin/nixos-rebuild", "build", "--flake", "/etc/nixos", "--no-build-output"],
capture_output=True, text=True, timeout=600, capture_output=True, text=True, timeout=600,
) )
if result.returncode == 0: if result.returncode == 0: