From 5a50b39d76816e407b95895d3a50c9ae9e260f92 Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Wed, 1 Jan 2025 06:59:04 -0800 Subject: [PATCH] feat(readTree): expose ability to invoke with rootDir=false readTree gives special treatment to the directory on which it is invoked -- for example, it won't read *.nix files in that directory. This commit adds the ability to disable this special treatment, which remains the default behavior. Example use case: https://codeberg.org/amjoseph/six-demo/commit/10029d3682e3380e0f52015bfcdd5998468c2dc0 Change-Id: I306bea95f4d556f7090f3255e6da6bb410adbf57 Reviewed-on: https://cl.tvl.fyi/c/depot/+/12939 Tested-by: BuildkiteCI Autosubmit: Adam Joseph Reviewed-by: tazjin --- nix/readTree/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nix/readTree/default.nix b/nix/readTree/default.nix index 4a745ce33..0f2d4260c 100644 --- a/nix/readTree/default.nix +++ b/nix/readTree/default.nix @@ -259,12 +259,12 @@ in , args , filter ? (_parts: x: x) , scopedArgs ? { } + , rootDir ? true }: readTree { - inherit args scopedArgs; + inherit args scopedArgs rootDir; argsFilter = filter; initPath = path; - rootDir = true; parts = [ ]; };