mirror of
https://github.com/nix-community/home-manager.git
synced 2025-12-16 14:01:08 +01:00
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 <khaneliman12@gmail.com>
This commit is contained in:
parent
1a4d8ffd32
commit
1e54837569
1 changed files with 4 additions and 2 deletions
|
|
@ -11,13 +11,15 @@ let
|
||||||
file:
|
file:
|
||||||
let
|
let
|
||||||
isNixFile = lib.hasSuffix ".nix" file;
|
isNixFile = lib.hasSuffix ".nix" file;
|
||||||
|
filePath = ../../. + "/${file}";
|
||||||
|
fileExists = builtins.pathExists filePath;
|
||||||
|
|
||||||
moduleResult =
|
moduleResult =
|
||||||
if isNixFile then
|
if isNixFile && fileExists then
|
||||||
let
|
let
|
||||||
result = builtins.tryEval (
|
result = builtins.tryEval (
|
||||||
let
|
let
|
||||||
fileContent = import (../../. + "/${file}");
|
fileContent = import filePath;
|
||||||
|
|
||||||
module =
|
module =
|
||||||
if lib.isFunction fileContent then
|
if lib.isFunction fileContent then
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue