Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.0k views
in Technique[技术] by (71.8m points)

operating system - How to fetch the path for the environment variable in Windows 10

I have set the path for one of the executable in Windows 10 and set the PATH variable to point to the executable. For some reason, the older version of the executable is being picked up.

Below is the output when I run the command from within the directory where I have the executable

kubectl.exe version
Client Version: version.Info{Major:"1", Minor:"19", GitVersion:"v1.19.3", GitCommit:"1e11e4a2108024935ecfcb2912226cedeafd99df", GitTreeState:"clean", BuildDate:"2020-10-14T12:50:19Z", GoVersion:"go1.15.2", Compiler:"gc", Platform:"windows/amd64"}
Unable to connect to the server: dial tcp: lookup 16afdbd3-9f18-476b-b709-0f52f767c086.k8s.ondigitalocean.com: no such host

Below is the output in all other locations

Client Version: version.Info{Major:"1", Minor:"9", GitVersion:"v1.9.7", GitCommit:"dd5e1a2978fd0b97d9b78e1564398aeea7e7fe92", GitTreeState:"clean", BuildDate:"2018-04-19T00:05:56Z", GoVersion:"go1.9.3", Compiler:"gc", Platform:"windows/amd64"}
Unable to connect to the server: dial tcp: lookup 16afdbd3-9f18-476b-b709-0f52f767c086.k8s.ondigitalocean.com: no such host

The versions are different. Is there a way to check how the PATH variable is resolving the location.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...