dune
dune copied to clipboard
Dev tool which command fails if tool not installed
Previously dune tool which would print the path to where a dev tool would be installed, regardless of whether it is currently installed. This is inconsistent with how the which unix command works. This commit changes its default behaviour to print an error and exit with non-zero if the specified tool is not installed, allowing the command to be used to check whether a given tool is currently inalled and bring it into line with how which commands conventionally behave.
The original behaviour is preserved with the --allow-not-installed flag.
I've also taken the opportunity to unify the implementations of which across dev tools.
CC @pitag-ha