From 060f4757292e1e7172cc9ebcb16f38d89cb707ab Mon Sep 17 00:00:00 2001 From: pizzapim Date: Thu, 9 May 2024 01:34:29 +0200 Subject: [PATCH] Fix Bash expansion in kubeconfig path of CLI script (#63) * Fix $HOME expansion in CLI script * Allow overwriting kubeconfig at run-time of CLI script --- pkgs/kubenix.nix | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/pkgs/kubenix.nix b/pkgs/kubenix.nix index 88555ca..dfb7215 100644 --- a/pkgs/kubenix.nix +++ b/pkgs/kubenix.nix @@ -36,11 +36,10 @@ symlinkJoin { passthru.manifest = result; postBuild = '' - export DIFF="${diff}" wrapProgram $out/bin/kubenix \ --set PATH "$out/bin" \ - --set KUBECONFIG "${kubeconfig}" \ - --set KUBECTL_EXTERNAL_DIFF "''${DIFF}" \ - --set MANIFEST "${result}" + --run 'export KUBECONFIG=''${KUBECONFIG:-${kubeconfig}}' \ + --set KUBECTL_EXTERNAL_DIFF '${diff}' \ + --set MANIFEST '${result}' ''; }