robrwo / Alien-TidyHTML5

0 stars 0 forks source link

handle either tidy or tidy5 as executable name #3

Closed plicease closed 5 years ago

plicease commented 5 years ago

I think this will resolve #2.

I think you were on the right track adding a method to provide the executable name at runtime, but the bin_dir function returns the paths that are necessary to add to the $PATH in order to find the executable, meaning for a system install it should be empty since it will already be in $PATH. This is kind of annoying but it is what you want, if the exe is already in the $PATH you don't want to be adding it again in a different order! So as written, the exe_file function won't ever work for a system install.

The usual way that I go about this is when there is an executable which might be called something different is to probe for the name at install time and store it in the runtime_prop's as command (this is actually the reserved property name for this, although I don't think any of the plugins actually use it). Alien::gmake, which provides Gnu make as either make or gmake is a good example, although it is also doing a lot of other things so it might not be the most readable example.

robrwo commented 5 years ago

Thanks for your help!