Allow to pass features to cargo install in rust hooks · Issue #3230 · pre-commit/pre-commit
Repository navigation
Allow to pass features to cargo install in rust hooks #3230
New issue
New issue
Open
#3235
Open
Allow to pass features to cargo install in rust hooks #3230 #3235
Description
@Terseus's profile Terseus opened on Jun 12, 2024search you tried in the issue tracker
rust features
describe your actual problem
The rust hooks execute cargo install --bins --root <root-dir> <packages> (taken from here ) to install the hook, however if a hook wants to use a different set of features than its default features it can't because there's no way to pass either additional flags to the install command or a --features <features> to cargo command.
See JohnnyMorganz/StyLua#867 for a real world example where this has become a limitation.
It would be great to have a way to configure a hook to pass cargo additional features when building the hook's package.
pre-commit --version
3.7.1