Skip to content

Commit

Permalink
scripts: create ~/.kube if it does not exist
Browse files Browse the repository at this point in the history
  • Loading branch information
burgerdev committed Nov 13, 2024
1 parent b87421a commit 0315963
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/scripts.nix
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,9 @@
newContext=$(yq -r '.contexts.[0].name' "$1")
declare -x newContext
yq -i '.current-context = env(newContext)' "$mergedConfig"
mv "$mergedConfig" "''${KUBECONFIG_BAK%%:*}"
targetFile="''${KUBECONFIG_BAK%%:*}"
mkdir -p "$(dirname "$targetFile")"
mv "$mergedConfig" "$targetFile"
'';
};

Expand Down

0 comments on commit 0315963

Please sign in to comment.