graphviz-s
graphviz-s copied to clipboard
assume dot is on path
On my local machine, dot is at /usr/local/bin/dot
. If it is safe to assume that dot is on the path and executable, I don't see a problem with referencing it directly.
Hi @joprice -- I think we need to make the location of dot configurable. It varies from place to place, and isn't necessarily on the command-line. I've had java exec calls not go through a path search at all on some versions of java with some platforms. What do you think?
Agreed that making it configurable or assuming it's on the path is better than hardcoding the location, since it puts the user in control. Do you think something is needed to make it more easily configurable? To maintain parity with the existing api, maybe a companion helper?
// library code
object Exec {
def apply(binary: File) = new Exec {
val dotBinary = binary
}
}
// user code
val customExec = Exec("/usr/local/bin/dot")
import customExec._
Or an akka-style config file? I think they are complementary options, actually. I like your Exec import trick for user-override of the binary location. If you could code this one up in this pull request, then I'll merge it in.
Updated with the helper.
@drdozer Think this one is ready? Simmering for 4 years. Nice and congealed.