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

Fix sku init on Windows #833

Merged
merged 2 commits into from
Jun 9, 2023
Merged

Fix sku init on Windows #833

merged 2 commits into from
Jun 9, 2023

Conversation

askoufis
Copy link
Contributor

@askoufis askoufis commented Jun 8, 2023

npx sku init <name> was broken on windows. The app folder would be created, but the src directory containing the sku template files was never created.

This was occurring because fast-glob expects / as a path separator, so windows paths with \ are interpreted as paths with escaped characters, resulting in an empty array from the glob. The init script uses __dirname to drive the template creation, so by ensuring we convert it to a posix path, and use the posix implementations of the path methods, the glob should receive correct input.

We currently do not run our CI on windows agents, and there are no plans to do so in the future. However, this fix has been tested on my personal windows machine, as well as on the widnows machine of the user that reported the bug.

@askoufis askoufis requested a review from a team as a code owner June 8, 2023 05:16
@changeset-bot
Copy link

changeset-bot bot commented Jun 8, 2023

🦋 Changeset detected

Latest commit: 48e6ff2

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
sku Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

packages/sku/lib/toPosixPath.js Outdated Show resolved Hide resolved
Co-authored-by: Remus Mate <rmate@seek.com.au>
@askoufis askoufis enabled auto-merge (squash) June 9, 2023 03:52
@askoufis askoufis merged commit be929c0 into master Jun 9, 2023
4 checks passed
@askoufis askoufis deleted the fix-init-windows branch June 9, 2023 03:52
@seek-oss-ci seek-oss-ci mentioned this pull request Jun 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants