File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
util/src/main/java/io/kubernetes/client/util Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ public class KubeConfig {
34
34
private static final Logger log = LoggerFactory .getLogger (KubeConfig .class );
35
35
36
36
// Defaults for where to find a kubeconfig file
37
- public static final String ENV_HOME = "HOME" ;
37
+ public static final String ENV_HOME ;
38
38
public static final String KUBEDIR = ".kube" ;
39
39
public static final String KUBECONFIG = "config" ;
40
40
private static Map <String , Authenticator > authenticators = new HashMap <>();
@@ -63,6 +63,12 @@ public static void registerAuthenticator(Authenticator auth) {
63
63
static {
64
64
registerAuthenticator (new GCPAuthenticator ());
65
65
registerAuthenticator (new AzureActiveDirectoryAuthenticator ());
66
+
67
+ if (System .getProperty ("os.name" ).toLowerCase ().startsWith ("windows" )) {
68
+ ENV_HOME = "USERPROFILE" ;
69
+ } else {
70
+ ENV_HOME = "HOME" ;
71
+ }
66
72
}
67
73
68
74
/** Load a Kubernetes config from a Reader */
You can’t perform that action at this time.
0 commit comments