-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Warn the user when in a path that contains special characters #4966
Comments
I think In my environment, non-ASCII home (
I added disk_params.last.encode!('Shift_JIS') to here, and it worked. 😩 May be relevant to current code page.
|
Ah, I was getting confused between The default <SystemProperties defaultMachineFolder="C:\Users\健吾\VirtualBox VMs" defaultHardDiskFormat="VDI" VRDEAuthLibrary="VBoxAuth" webServiceAuthLibrary="VBoxAuth" LogHistoryCount="3" exclusiveHwVirt="false"/> This works. <SystemProperties defaultMachineFolder="C:\VMs" defaultHardDiskFormat="VDI" VRDEAuthLibrary="VBoxAuth" webServiceAuthLibrary="VBoxAuth" LogHistoryCount="3" exclusiveHwVirt="false"/> |
I discovered a method to "solve" this problem if someone doesn't want to change the real path to MKLINK /J Link Target Take this for an example: MKLINK /J C:\Devs\links\i C:\Users\宁 You can place the link wherever you like ( a path that does not contain non-ASCII encoding characters ), then add What's more, I think Hope this will help 😃 |
We are going to fix the paths instead. |
@sethvargo Have you discussed this further? I ran into the user folder with special chars problems with 2.0.3... |
@atorstling - Please open a new issue. Thanks! |
|
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
There are a number of things, namely on Windows, where any non-UTF-8 character (and sometimes even non-alpnum characters) cause things to fail.
For gem installations that require compiling native extensions, any non-alphnum character will cause the build to fail - that means paths with spaces (like
C:\My User
) or parenthesis (likeProgram Files (x86)
) will cause the installation to fail.Similarly, there are known issues in VirtualBox where non-UTF-8 characters in paths cause strange things to happen (#2113).
Given the breadth, span, and nature of these issues, I do not think it is possible to "fix" Vagrant. Instead, I propose we add a function early in Vagrant's initialization stage that sanity checks important paths and prints a helpful warning message (perhaps linking to more verbose documentation) when those paths contain "invalid" characters. Namely:
VAGRANT_HOME
GEM_HOME
GEM_PATH
GEM_ROOT
PWD
The text was updated successfully, but these errors were encountered: