From 1e54837569e0b80797c47be4720fab19e0db1616 Mon Sep 17 00:00:00 2001 From: Austin Horstman Date: Sun, 13 Jul 2025 23:32:19 -0500 Subject: [PATCH] ci: extract-maintainers handle non-existent files (#7469) Since we're checking out the `pull_request_target` and not the `pull_request` branch. We can't evaluate the files from the PR branch. We can skip the files for evaluation without crashing the entire extraction. Signed-off-by: Austin Horstman --- lib/nix/extract-maintainers.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/nix/extract-maintainers.nix b/lib/nix/extract-maintainers.nix index 61c83cdca..360b89844 100644 --- a/lib/nix/extract-maintainers.nix +++ b/lib/nix/extract-maintainers.nix @@ -11,13 +11,15 @@ let file: let isNixFile = lib.hasSuffix ".nix" file; + filePath = ../../. + "/${file}"; + fileExists = builtins.pathExists filePath; moduleResult = - if isNixFile then + if isNixFile && fileExists then let result = builtins.tryEval ( let - fileContent = import (../../. + "/${file}"); + fileContent = import filePath; module = if lib.isFunction fileContent then