Fix: Valet Install - Ansicon fails due to space in directory name#12
Merged
Conversation
This is a fix for those, who are facing error running command "valet install", because of having space in directory names, mostly space in username. Faced this issue at the stage of installing Ansicon, due to a space in username.
Author
yCodeTech
added a commit
that referenced
this pull request
May 22, 2024
- Fixes multiple cmd or powershell commands for spaces in the directories, by wrapping the paths in double quotes. - Changed the `pathFilter` function from #12 to replace forward slashes with the OS appropriate `DIRECTORY_SEPARATOR` to prevent errors where the paths aren't exploded because of the `/`s. This error occurred in the `COMPOSER_GLOBAL_PATH` in the powershell command in `diagnose`. [Line 41]. - Moved the `diagnose` commands array into `__construct` function so that we can use the global `valetBinPath` function. - Changed the `diagnose` powershell command [Line 41] to use the `pathFilter()` function so that it's path can be shortened if there are spaces. - Changed all `__DIR__` in the `diagnose` commands array to `valetBinPath()`.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.

This is a fix for those, who are facing error running command "valet install", because of having space in directory names, mostly space in username. Faced this issue at the stage of installing Ansicon, due to a space in username.