totten / civix

CiviCRM Extension Builder
http://civicrm.org/
Other
57 stars 56 forks source link

Paths - On Windows, normalize to forward-slash #368

Closed totten closed 2 months ago

totten commented 2 months ago

As reported by loren-bm on (Mattermost), there's a recent regression when running civix upgrade on Windows:

Executing upgrade script phar://E:/d10/vendor/civicrm/cli-tools/extern/civix.phar/upgrades\24.09.0.up.php

In Checker.php line 55:

  [RuntimeException]
  Unrecognized library: civimix-schema@5

The underlying problem involves the switch to Webmozart\Glob -- @demeritcowboy found that it expects to have paths normalized using /. This is not entirely unusual. Symfony Filesystem v5.4+ has a similar normalization policy.

This revision should fix the error. The patch is a little more aggressive, in that it flip-flips on the whole approach to normalizing paths:

I've posted an example build of civix.phar at:

https://ephemera.civicrm.org/civix/civix.phar-2024-09-25-windows

demeritcowboy commented 2 months ago

Thanks. This works for me. 👍