commit 9221c199aed5b8e606d162fbce86ba6515903d6e
| author | 斟酌 鵬兄 <tgckpg@gmail.com> |
| date | 2023-10-08T19:11:58Z |
| subject | Fixed kcontext k8s path for cygwin |
commit 9221c199aed5b8e606d162fbce86ba6515903d6e
Author: 斟酌 鵬兄 <tgckpg@gmail.com>
Date: 2023-10-08T19:11:58Z
Fixed kcontext k8s path for cygwin
---
bash/sources/17_kcontext | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/bash/sources/17_kcontext b/bash/sources/17_kcontext
index 67dd61a..e014895 100644
--- a/bash/sources/17_kcontext
+++ b/bash/sources/17_kcontext
@@ -66,6 +66,13 @@ function kcontext-k8s {
chmod 600 "$_CONF"
echo $KUBECONFIG | grep "$_CONF" -q
+
+ case $OSTYPE in
+ cygwin)
+ _CONF=$( cygpath -w "$_CONF" )
+ ;;
+ esac
+
if [ $? -eq 0 ]; then
export KUBECONFIG="$_CONF"
else