You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Could you elaborate a bit on the specific use case you have in mind, and why you'd want/need this as opposed to the approaches that are already available today?
I'll take a guess and assume it's because you're trying to run some rather large commands like the one you mentioned in #181? I was originally going to ask why something like:
[hooks]
pre-commit = "FOO=bar cargo test ..."
wouldn't suffice for you, though similar question with the direct exports. Is it a matter of preference/perceived convenience or are you have issues getting the vars set in the context the commands are executed?
Also FWIW, that example is starting to hit the limits of what I'd want to try to specify inline in a toml key value. When the desired command(s) get large enough, I personally think folks would find it easier to utilize additional tooling like cargo make, or even adding a shell script to the repo (just be sure to make it executable on the git index) and set the toml file to
Description
Allow setting environment variables before executing command via hook.
Value
we will be able to execute command which are dependent on environment variable.
The text was updated successfully, but these errors were encountered: