fix(openrc): preserve migration execution context

This commit is contained in:
Lain Soykaf 2026-07-29 15:02:16 +04:00
commit 8943ab8140
No known key found for this signature in database
2 changed files with 4 additions and 6 deletions

View file

@ -39,7 +39,8 @@ depend() {
start_pre() {
ebegin "running migrations if any"
su -s /bin/sh -c '/usr/bin/mix ecto.migrate' -l "${command_user}"
su -s /bin/sh -c "cd \"${directory}\" && exec /usr/bin/mix ecto.migrate" \
"${command_user%%:*}"
eend "$?"
}