Skip to content

Fix detection of root fields.js in Windows - #8

Open
IanRMcNair wants to merge 1 commit into
HubSpot:mainfrom
IanRMcNair:fix-windows-fields
Open

Fix detection of root fields.js in Windows#8
IanRMcNair wants to merge 1 commit into
HubSpot:mainfrom
IanRMcNair:fix-windows-fields

Conversation

@IanRMcNair

Copy link
Copy Markdown

In Windows, the CLI doesn't properly detect a fields.js/mjs/cjs in the root of the theme, due to how the relativePath is checked. In Windows, it should check for \, instead of /. This is just a quick fix to make it check for both versions. There's probably a more "proper" way to get the root directory, but this works well enough on my system.

@brandenrodgers

Copy link
Copy Markdown
Contributor

Thanks for finding this! It looks like we may be able to use path.sep here, which could simplify this a bit.

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.

2 participants