fix: correct path on Windows to create and delete typegen file #41
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello Matt,
Thanks for your work on XState, it's amazing and inspiring!
On Windows, the typegen file is not generated. I followed the lead you wrote in the issue #40.
I fixed the issue on Windows. Unfortunately, I don't have a Mac, so I was unable to test on macOs. But maybe, it can help you.
I used
vscode.Uri.parse
to extract the path from the URI. But the result is prefixed with a slash that causedfs.writeFile
to prefix the path with "C:". So I removed this slash withslice(1)
and it works! (at least on Windows).Thanks!