Fix #4726: On Windows, inform or warn about 'programs' path with space #4801
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In module
Stack.Config
, functionconfigFromConfigMonoid
, a stack user is informed if the stack 'programs' path contains a space character. If the path also does not have an alternative short ('8 dot 3') name, the user is further warned of the implications for packages that make use of the GNU project'sconfigure
shell script.New modules
System.Info
are added tosrc/windows
andsrc/unix
to re-exportgetShortPathName
from theSystem.Win32.Info
module of theWin32
package in the case of Windows and do nothing in the case of Unix-like operating systems. This avoids the need for C preprocessor (CPP) directives inStack.Config
.ChangeLog.md
is updated, accordingly.Tested on Windows 10 with 'programs' paths that do and do not contain space characters and, in the latter case, with paths that do and do not have '8 dot 3' names. Tested with paths that do not yet exist when stack is first run.
Note: Documentation fixes for https://docs.haskellstack.org/en/stable/ should target the "stable" branch, not master.
Please include the following checklist in your PR:
Please also shortly describe how you tested your change. Bonus points for added tests! See above.