Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix with Glob where path provided has wild card and using backward slash #25

Merged
merged 1 commit into from
Apr 9, 2023

Conversation

Andrew-D-Wilson
Copy link

@Andrew-D-Wilson Andrew-D-Wilson commented Apr 6, 2023

If a path specified with backward slashes, wild card and file type such as: .\test\*.bicep; Glob will use the backward slash as an escape character to the wildcard * leaving the path to remain as .\test\.bicep when checking for hasMagic; This results in the path being amended to: .\test\*.bicep**

  • this will then find no bicep/json files to buid/decompile

Fixed using the same directory replacement line used further below in the fileUtils.ts:

  • directoryToGetFiles = directoryToGetFiles.replace(/\/g, '/');

Verifications:
Amended jest tests
Amended Yaml pipeline

@piraces
Copy link
Owner

piraces commented Apr 8, 2023

Hi @Andrew-D-Wilson , thank you very much for your contribution! Will review it and release a new version of the extension as soon as possible 👍

@piraces piraces self-assigned this Apr 8, 2023
@piraces piraces added the bug Something isn't working label Apr 8, 2023
@piraces piraces merged commit 5a07c1b into piraces:main Apr 9, 2023
@piraces
Copy link
Owner

piraces commented Apr 9, 2023

Hello again @Andrew-D-Wilson , the patch is now published in the marketplace and should be rolled out automatically to all users using the extension. If your pipeline shows the latest version, then this fix is included. Thanks for all 👍

@Andrew-D-Wilson
Copy link
Author

Morning @piraces, I have updated our pipeline and all is working, appreciate the quick turn around! Love the task and happy to contribute.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants