cincheo / jsweet

A Java to JavaScript transpiler.
http://www.jsweet.org
Other
1.45k stars 160 forks source link

Clear error if we cannot find the desired command #608

Closed crummy closed 4 years ago

crummy commented 4 years ago

Problem

I'm trying to get jsweet to build in docker and for some reason it can't find my NPM. I haven't figured out why but it took me a while to figure out that this was the cause of the message I was seeing.

Solution

Print out a clear message when we cannot find the command we wish to run, instead of throwing a NPE later

renaudpawlak commented 4 years ago

Looks good to me. Nice use of optionals btw :) Thanks!

renaudpawlak commented 4 years ago

I had to change the behavior a little because your fix was skipping a useful fallback. Tell me if it still works for you.