Closed moremada closed 8 months ago
@moremada thanks for following up on this! The problem seems to have been related to the branch name indeed.
I ran a git fetch origin pull/200/head:luis_moremada/fix-windows-glob-separator
so I could keep your commits in a new branch and opened a duplicate PR. It got picked up in this build as well.
Thanks @moremada for your help fixing this issue! Closing in favour of https://github.com/zendesk/zcli/pull/220 which includes the commits 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 oftemplate.split('templates/')
. This is causing the following error:This PR explicitly instructs glob to return path results using posix path separators and allows the split pattern to match correctly.
Checklist