From 0d5effa7a602d90e94bb2a0c709947083ac1b52c Mon Sep 17 00:00:00 2001 From: Ben Webb Date: Mon, 3 Mar 2025 17:10:57 -0600 Subject: [PATCH] fix(tvix/cli): NIX_PATH contents are duplicated when -I is not passed Fix a bug introduced in 2daa4832490eddcfb2b9a19d7f651252ec766062 When the -I or --extra-nix-path option is not passed, the cli will interpret the contents of the NIX_PATH environment variable twice: once as part of the env attribute of clap's derive macro, and again in a custom nix_path function. The custom function implements the appending behavior nix users likely expect (see commit mentioned above), so the env attribute is dropped. The downside is that NIX_PATH is no longer rendered in the cli's help text. We can reclaim this behavior if we want to, but that's left for later. Change-Id: I2c0939d9453ea1af73e9ec15e45b25bf035a7493 Reviewed-on: https://cl.tvl.fyi/c/depot/+/13207 Autosubmit: benjaminedwardwebb Tested-by: BuildkiteCI Reviewed-by: flokli --- tvix/cli/src/args.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tvix/cli/src/args.rs b/tvix/cli/src/args.rs index 746e355e1..af9294c3e 100644 --- a/tvix/cli/src/args.rs +++ b/tvix/cli/src/args.rs @@ -50,7 +50,7 @@ pub struct Args { /// /// This option may be given multiple times. Paths added through -I take precedence over /// NIX_PATH. - #[clap(long = "extra-nix-path", short = 'I', env = "NIX_PATH", action = clap::ArgAction::Append)] + #[clap(long = "extra-nix-path", short = 'I', action = clap::ArgAction::Append)] pub extra_nix_paths: Option>, /// Print "raw" (unquoted) output.