Skip to content

Commit a74b689

Browse files
committed
users: check for ~/.kube and create if needed
1 parent 6684692 commit a74b689

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/warnet/users.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ def auth(auth_config):
2222

2323
is_first_config = False
2424
if not os.path.exists(KUBECONFIG):
25+
kube_folder = os.path.join(os.path.expanduser("~"), ".kube")
26+
if not os.path.exists(kube_folder):
27+
os.makedirs(kube_folder)
2528
try:
2629
write_kubeconfig(auth_config, KUBECONFIG)
2730
is_first_config = True

0 commit comments

Comments
 (0)