From 59ddb6e6cf9ce2342cdc1a50df2402f9340c54ba Mon Sep 17 00:00:00 2001 From: Daniel Salazar Date: Thu, 19 Dec 2024 11:31:53 -0500 Subject: [PATCH] feat(back): #1223 enforce root jobs - Force jobs to begin with / for currently CLI compatibility Signed-off-by: Daniel Salazar --- src/evaluator/modules/jobs/default.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/evaluator/modules/jobs/default.nix b/src/evaluator/modules/jobs/default.nix index 9ab38ca4..0a4b329d 100644 --- a/src/evaluator/modules/jobs/default.nix +++ b/src/evaluator/modules/jobs/default.nix @@ -2,7 +2,11 @@ { config, lib, ... }: let makeOutput = name: value: { - inherit name; + name = if lib.strings.hasPrefix "/" name then + name + else + abort + ''The job "${name}" must begin with a slash. Rename it to "/${name}"''; inherit value; }; in {