-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
minikube not added to PATH: installer uses setx.exe which runcates PATHs longer than 1024 chars #2587
Comments
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
/remove-lifecycle stale |
Same happened to me: Minikube version: 0.28.2
I use a PATH in windows that is rather modular, e.g.:
etc. This is basically to avoid PATH longer than 4096 characters which is not working on Windows... After running the minikube-installer.exe I spent some time debugging why my system is not working properly only to discover in huge shock that it efectivelly destroyed my PATH and it converted it to something like:
Didn't even add minikube installation into PATH. If I wouldn't have PATH split into smaller variables, installer would wipe 3/4 of my PATH and I would have to play with registries to fix it... |
/remove-lifecycle stale |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
AFAIK, this is still an issue. I'd be happy to approve any PR's which fix the behavior though. Help wanted! |
Some more context: https://superuser.com/questions/387619/overcoming-the-1024-character-limit-with-setx The file that needs to be modified within minikube is installers/windows/update_path.bat. It's unclear which approach is the most sane one, as they all seem to require an additional dependency. |
A good temporary fix, probably without introducing dependencies, would be to detect when the path will be to long, and not try to set it but instead show instructions on what to add manually to the path. |
Is this still a thing? I know as of 0.35 it was, but was this fixed in 1.0.0? I didn't use the installer for that. Would it be possible to use powershell for this on windows? I'm not sure if that gets around the problem somehow, or if that falls under the category of additional dependencies. But I'm happy to look into it if that's possibly in play. |
@ssargent - Yes, this is still a thing that exists. Patches are very welcome for this issue. Let me know if I can help in any way. |
@tstromberg - I will pick this up. Instead of using a Batch file for Windows, cannot we incorporate a PowerShell file? PowerShell is installed on all systems by default from Windows 7+ Also, I couldn't find any documentation on the minimum requirement of Windows Operating System for Minikube (I believe it is Windows 8+ as per here. There is a line which says that). Additionally, I couldn't find any documentation on how the installers are generated? |
@blueelvis - Thanks! My preference would be to continue to support Windows 7 and higher if possible. https://github.com/kubernetes/minikube/tree/master/installers/windows contains the code used in the installer. https://github.com/kubernetes/minikube/blob/master/Makefile#L288 shows the steps used to make the installer. I very much look forward to your PR! |
Is this a BUG REPORT or FEATURE REQUEST? (choose one):
BUG REPORT
Please provide the following details:
Environment:
Minikube version (use
minikube version
): v0.25.0cat ~/.minikube/machines/minikube/config.json | grep DriverName
): hypervcat ~/.minikube/machines/minikube/config.json | grep -i ISO
orminikube ssh cat /etc/VERSION
): minikube-v0.25.1.isoThe above can be generated in one go with the following commands (can be copied and pasted directly into your terminal):
What happened: Installed minikube using the Windows Installer. The update_path.bat script used setx.exe to add minikube's installation path to my system PATH variable. My system PATH is over 1024 chars long so setx.exe destructively truncated it. I had to restore my system PATH from registry backups.
What you expected to happen: minikube is installed without destructively changing my system PATH.
How to reproduce it (as minimally and precisely as possible): Start with a system PATH environment variable > 1024 chars. Run the minikube Windows installer.
Output of
minikube logs
(if applicable): N/AAnything else do we need to know: N/A
The text was updated successfully, but these errors were encountered: