-
-
Notifications
You must be signed in to change notification settings - Fork 184
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
Config paths from package.json
are relative to the working directory instead of package.json
#440
Comments
commit 0bec0bf should resolve this, could you confirm? (version |
🎉 This issue has been resolved in version 7.0.0-beta.17 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
LGTM, thank you! |
@hasezoey I've been doing more testing of this, and I'm noticing that the fix in 0bec0bf is incomplete. The This should be resolved by #469. |
🎉 This issue has been resolved in version 7.0.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
Versions
package:
mongodb-memory-server-core
What is the Problem?
When
findPackageJson
grabs configuration from apackage.json
, it setsdownloadDir
andsystemBinary
to the relative paths it finds inpackage.json
. WhenMongoBinary
is looking for the binary, it will look in those locations relative to the current working directory; however, it's possible that the current working directory will vary depending where the initial command was run. For example, I may run a test from the root of my project, or I may run it from the test directory. If I have configuration inpackage.json
in the root, the binary will be resolved differently in those scenarios.Code Example
We could add code to
findPackageJson
that resolvesdownloadDir
andsystemBinary
to absolute paths (based on the location of thepackage.json
):Do you know why it happenes?
Once a relative
downloadDir
is provided tomongoBinaryDownload
, it is resolved relative to the current working directory, for example:mongodb-memory-server/packages/mongodb-memory-server-core/src/util/MongoBinaryDownload.ts
Line 99 in 2bc5128
The text was updated successfully, but these errors were encountered: