Closed VoHoTv closed 6 months ago
Thanks for the report, @VoHoTv !
Is this some kind of misconfiguration on my system? Or am I missing some parameter? Thank you so much!
There are a lot of hardcoded /
references in wp dist-archive
🙈
I think the path breaking is building on Windows.
Maybe it's as simple as replacing the '/'
references with DIRECTORY_SEPARATOR
?
Feel free to submit a pull request, if you'd like. Here is some guidance on our pull request best practices.
Looks like there's a couple of things going on here:
/
when the separator could be \
.DRIVE_LETTER:\...
Take a look at what wp_normalize_path() and path_is_absolute() do. WordPress Core commonly uses these in similar scenarios.
@costdev Just did some tests and when I replace the current conditions which check if it's an absolute path:
"if ( 0 !== strpos( $path, '/' ) ) {}" and "if ( 0 !== strpos( $archive_path, '/' ) ) {}"
And replace it with a copy of the 2 functions you mentioned it works indeed.
Hi There, I am fetching the same issue. Is it fixed or Not?
@shamimipt It's not fixed, no. Feel free to submit a pull request, if you'd like. Here is some guidance on our pull request best practices.
I think we'll also want to get tests running on Windows https://github.com/wp-cli/wp-cli-tests/issues/155
@VoHoTv @shamimipt Can you install the wp dist-archive
main branch and see if https://github.com/wp-cli/dist-archive-command/pull/81 resolves your issue on Windows?
@VoHoTv Thank you so much.
Hi there! When running the wp dist-archive command I am getting the following erorr:
"Target directory does not exist: C:\Users\USER\Local Sites\het-lokaal\app\public\wp-content\themes\lokaal/C:\Users\USER\Local Sites\het-lokaal\app\public\wp-content\themes\lokaal/C:\Users\USER\Local Sites\het-lokaal\app\public\wp-content\themes"
Is this some kind of misconfiguration on my system? Or am I missing some parameter? Thank you so much!