Skip to content

Commit

Permalink
Fix Bash expansion in kubeconfig path of CLI script (#63)
Browse files Browse the repository at this point in the history
* Fix $HOME expansion in CLI script

* Allow overwriting kubeconfig at run-time of CLI script
  • Loading branch information
pizzapim authored May 8, 2024
1 parent c00c78b commit 060f475
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions pkgs/kubenix.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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}'
'';
}

0 comments on commit 060f475

Please sign in to comment.