Skip to content

Fix: Valet Install - Ansicon fails due to space in directory name#12

Merged
yCodeTech merged 1 commit into
yCodeTech:masterfrom
shahriarrahat:patch-1
May 21, 2024
Merged

Fix: Valet Install - Ansicon fails due to space in directory name#12
yCodeTech merged 1 commit into
yCodeTech:masterfrom
shahriarrahat:patch-1

Conversation

@shahriarrahat

Copy link
Copy Markdown

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.

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.
@shahriarrahat

Copy link
Copy Markdown
Author

Fix for the issue like the screenshot below -
image

This is caused by having space in username. When installing Ansicon, it breaks at the point of space in username. This can also be caused by having space in your other installation directories.

@yCodeTech yCodeTech merged commit 09c6f5d into yCodeTech:master May 21, 2024
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()`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants