fix: locate sentry-cli
when working with a mono-repo
#19
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.
The current approach to locating the
sentry-cli
executable makes the assumption that the package is installed in an Ember app at the root of the repository. This works fine most of the time, but breaks in a mono-repo where the actualnode_modules
directory might be above the current project in the directory structure.This change dynamically locates the
sentry-cli
executable by:package.json
for the@sentry/cli
package in a way that will work for both standard and mono-repo setups@sentry/cli
package from that path, which should be safe; thepackage.json
will always be at the package rootpackage.json
file for@sentry/cli
to determine where the executable actually livessentry-cli
executable from the information that we've gatheredThis makes the approach to locating
sentry-cli
resilient to changes in the directory structure for different types of apps