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 build on windows #1138

Merged
merged 2 commits into from
Nov 7, 2024
Merged

Fix build on windows #1138

merged 2 commits into from
Nov 7, 2024

Conversation

p-weston
Copy link
Contributor

@p-weston p-weston commented Nov 1, 2024

This fixes the build on windows, where new URL("deno.json", import.meta.url).pathname starts with /C:/ which isn't a valid path.

First time with deno, so not sure this is idomatic.

@p-weston
Copy link
Contributor Author

p-weston commented Nov 6, 2024

Updated to use fileURLToPath which looks like a better fix.

@zefhemel
Copy link
Collaborator

zefhemel commented Nov 7, 2024

Ok indeed, your previous suggestion actually changed behavior but this looks good. Not a huge fan of starting to rely on node.js APIs, but for builds I think it's ok. Let me quickly check if this doesn't break anything on other platforms.

@zefhemel
Copy link
Collaborator

zefhemel commented Nov 7, 2024

Looks good. Thanks!

@zefhemel zefhemel merged commit d9d3868 into silverbulletmd:main Nov 7, 2024
1 check passed
@v-shenoy
Copy link
Contributor

v-shenoy commented Nov 8, 2024

Still new to Deno, but I think this could have been done with fromFileUrl to avoid dependency on the Node API.

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.

3 participants