-
Notifications
You must be signed in to change notification settings - Fork 22
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
sde
command fails on Windows and/or when path contains spaces
#222
Comments
sde
command fails on Windowssde
command fails on Windows and/or when path contains spaces
The specific cause of this particular issue is related to the way we get the directory name for the current source file. I think before we converted the sources to be ESM-friendly, we'd just use const srcDir = new URL('.', import.meta.url).pathname In other projects, I used the following: const srcDir = dirname(fileURLToPath(import.meta.url)) On Unix, these two forms produce similar/compatible results:
But on Windows, they produce different results:
Additionally, the first form doesn't lead to usable paths on Unix when there are spaces in the directory name:
To fix this particular issue, I think we should switch to the second form. I had started working on additional changes to allow for building/testing on Windows in our GitHub Actions workflow, but there are likely other issues to resolve, so I will file a separate issue for that work. |
There were a couple of other related issues that I fixed as part of this:
|
The
sde
CLI fails to run on Windows due to a late change I made before publishing 0.7.0:The code that loads the current version from
package.json
needs to be updated to be more Windows friendly.As part of this, we should extend the CI build script to (optionally) build on Windows in addition to Linux to catch these issues earlier.
The text was updated successfully, but these errors were encountered: