Fixes an issue on Windows where the template identifier incorrectly matches due to non-posix path separator being used, but posix path separators being expected.
Do NOT write here! This section will be filled in by GitHub Action
automatically. If you don't want this, either remove the markers or write
outside the fences.
Detail
On Windows, the globSync function returns the \ path separator by default. However, we are matching against a posix path separator of / as can be seen on line 9's split pattern of template.split('templates/'). This is causing the following error:
TypeError: Cannot read properties of undefined (reading 'split')
This PR converts Window paths to POSIX paths (by replacing \ to /) for the inputs and the outputs of the globSync function without used the new posix option available from glob 10.1.0.
Checklist
[x] :guardsman: includes new unit and functional tests
Thanks @sebastienwarin for your help fixing this issue!
Closing in favour of https://github.com/zendesk/zcli/pull/220 which includes the commit in this PR and just got released.
Description
Fixes an issue on Windows where the template identifier incorrectly matches due to non-posix path separator being used, but posix path separators being expected.
Do NOT write here! This section will be filled in by GitHub Action automatically. If you don't want this, either remove the markers or write outside the fences.
Detail
On Windows, the globSync function returns the \ path separator by default. However, we are matching against a posix path separator of / as can be seen on line 9's split pattern of template.split('templates/'). This is causing the following error:
TypeError: Cannot read properties of undefined (reading 'split')
This PR converts Window paths to POSIX paths (by replacing \ to /) for the inputs and the outputs of the globSync function without used the new posix option available from glob 10.1.0.
Checklist