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

Better support for locally installed tools #47

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

robyoder
Copy link

@robyoder robyoder commented Jan 27, 2022

The --elm-test arg was only working with absolute paths, and a locally installed copy of elm wouldn't work at all.

Using path.resolve seemed like a pretty straightforward fix for elm-test, but then I realized the default value for the arg was "elm-test", which is definitely not meant to be resolved as a relative path. I'm not sure what the cleanest way to approach this would be, but I took the perspective that anyone setting it to something other than the default is most likely to be using a path, not another name meant to be resolved by Node, so we can just resolve the value as a relative path if it's not the default value.

For elm, I noticed in #20 that @zwilias had recommended using npm-which, and that did the trick nicely.

I've not added tests because it's getting late and I'm just trying to get this working for my project and I wasn't actually totally sure how to test the elm one anyway. I'd love any guidance on this.

Resolves #45

@robyoder
Copy link
Author

I wonder if we should use npm-which on the default elm-test value also, to provide default support for local installs.

@robyoder
Copy link
Author

Hey, @zwilias, can you take a look?

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.

Cannot run with locally-installed tools
1 participant