Add cross-platform compatibility for the new exec
type post_write_hook
by changing executable
to a list
#1399
caffeinatedMike
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm trying to utilize ruff in my
post_write_hooks
section ofalembic.ini
by using the newexec
type hook introduced by #1275 and released in #1276. With this new hook type I'm running into an issue when developing on different platforms (Windows and Linux). Whenpip install
ing packages on windows all executables (like ruff) are placed in.venv/Scripts/*
, while Linux places them in.venv/bin/*
.What I think would be beneficial is to introduce a change to the
hook.executeable
field that makes it a list instead of a singular value. Then, when the hook runs it would try to locate the executable in the first location and move onto the next location if the executable was not found. That would allow cross-platform functionality without needing to modify thealembic.ini
file whenever pulling down a repository or needing to maintain two different versions for different platforms.Beta Was this translation helpful? Give feedback.
All reactions