Skip to content

Commit d972bb2

Browse files
committed
Updated changelog and a comment for pathFilter.
1 parent e2539dc commit d972bb2

File tree

2 files changed

+31
-1
lines changed

2 files changed

+31
-1
lines changed

CHANGELOG.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,36 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased](https://github.com/yCodeTech/valet-windows/tree/master)
99

10+
## [3.1.3](https://github.com/yCodeTech/valet-windows/tree/v3.1.3) - 2024-05-23
11+
12+
### Fixed
13+
14+
- Fixed Valet install failure, particularly with Ansicon due to spaces in the user directory name (Fix PR by @shahriarrahat in https://github.com/yCodeTech/valet-windows/pull/12).
15+
16+
- Adds a `pathFilter` function to replace the directory name with it's Windows shortname equivalent. e.g. from `John Doe` to `JOHNDO~1`. For use with the `valetBinPath` function that is used in the Ansicon installation.
17+
18+
- Fixed multiple cmd or powershell commands for spaces by wrapping them in double quotes.
19+
20+
- Fixed errors where composer diagnostics and the valet diagnostics output file couldn't be written because it was trying to write to the terminal's current working directory, which could be a protected directory like `Program Files`. Added `VALET_HOME_PATH` to the commands, so that they get saved to `~/.config/valet`.
21+
22+
- Fixed the copying of the diagnostics output to clipboard that just stopped working for unknown reasons. Fixed by changing `cli->run` to `cli->powershell` to ensure that the copy command `clip` is available.
23+
24+
- Fixed the nginx config check command in `diagnose`, where it errors out because it couldn't find the file due to:
25+
26+
- the path after the `-c` option couldn't be the shortened username via the `valetBinPath()`. Changed it back to use `__DIR__` . And added an escaped double quotes (`\"`) around it.
27+
28+
- the replacing of all backslashes in the command. This meant that with the new escaped double quotes it changed the backslash to forward slash. So instead of `-c \"C:/Users/...` it was changed to `-c /"C:/Users/...` and the system interpreted it as `"C:/C:/Users/...`
29+
30+
Fixed by changing the replace function to use a regex that only replaces single backslashes and disregards the escaped quotes.
31+
32+
### Changed
33+
34+
- Changed `pathFilter` function from https://github.com/yCodeTech/valet-windows/pull/12 to replace forward slashes with backslashes to prevent errors within the function where paths aren't exploded because the `/`s. But replaced the backslashes back to forwardslashes once the function was complete and fix further errors that occurred.
35+
36+
- Moved the `diagnose` commands array into the `__construct` function so that we can use the global `valetBinPath` function and allow the paths to also be changed to the short username if needed.
37+
38+
- Changed various `diagnose` array commands to use the `valetBinPath` function and the command that has the `COMPOSER_GLOBAL_PATH` to use the `filterPath` function.
39+
1040
## [3.1.2](https://github.com/yCodeTech/valet-windows/tree/v3.1.2) - 2024-05-17
1141

1242
### Fixed

cli/includes/helpers.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@ function valetBinPath() {
388388
*
389389
* @param string $path The path
390390
*
391-
* @return string `"c:\Users\Userna~1\......"`
391+
* @return string `"c:\Users\USERNA~1\......"`
392392
*/
393393
function pathFilter($path) {
394394

0 commit comments

Comments
 (0)