Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

sfcc-ci library code.diffdeploy issue on win #266

Closed
vkusok opened this issue Nov 27, 2021 · 3 comments · Fixed by #292
Closed

sfcc-ci library code.diffdeploy issue on win #266

vkusok opened this issue Nov 27, 2021 · 3 comments · Fixed by #292
Labels
bug Something isn't working
Milestone

Comments

@vkusok
Copy link

vkusok commented Nov 27, 2021

Hi All,

I am observing an issue with diffdeploy on windows.
My research has shown that diffdeploy method is using globby which is expecting patterns without backslashes and if the string contains backslash char, such chars will be ignored.

E.g. this part of code:

const files = await globby(directories.map(directory => path.join(directory, 'cartridges/**/*')), { ignore: ignoreAcrossDirectories });

After path.join we will have cartridges\**\* which results cartridges*** for globby lib. And as a result, the system will not be able to find files matching the pattern.

The solution can be in replacing path.join with straight POSIX specifying to avoid backslashes.

Example of working solution with path.join to path.posix.join replacement:
const files = await globby(directories.map(directory => path.posix.join(directory, 'cartridges/**/*')), { ignore: ignoreAcrossDirectories });

Please share your thoughts and if you've faced this issue let me know and I'll submit a pull request.

@tobiaslohr
Copy link
Contributor

Thanks for raising @vkusok!

@jordanebachelet Can you please give your thoughts on that?

@tobiaslohr tobiaslohr added the bug Something isn't working label Jan 13, 2022
@jbachelet
Copy link
Contributor

jbachelet commented Feb 11, 2022

Hello @vkusok ,

I opened the PR#292 to fix this issue.

Can you please checkout this out and test it on your side?
Thanks!

@tobiaslohr
Copy link
Contributor

Thanks much for looking into this @jbachelet! Please have a look @vkusok if this fixes your issue on Windows.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
3 participants