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
RELEASE_ROOT="$(CDPATH='' cd "$(dirname "$SELF")/.." && pwd -P)"
It works if you're executing script directly, or if you're making an absolute symlink; in both cases $SELF is an absolute path.
However if one would create a symlink like that:
$ test_release
cd: can't cd to ../lib/whatever/bin/..
Usecase:
Trying to make a binary package out of release folder requires either custom prefix (e.g. release folder is copied to /opt/whatever and then PATH is updated) or creating an absolute symlink to /usr/bin or other prefix which is used on a target system.
Relative symlink would allow much easier deployment of Mix.Releases, because it will eliminate post-install step which may not be available for a particular distribution method/system.
Thank you!
Expected behavior
Script works
The text was updated successfully, but these errors were encountered:
Elixir and Erlang/OTP versions
Elixir 16.2
OTP 26.2.5
Operating system
NetBSD
Current behavior
After producing a release with
mix release
, resulting main script for a release expects absolute directory path for the invocation.elixir/lib/mix/lib/mix/tasks/release.init.ex
Lines 90 to 92 in 61acf33
It works if you're executing script directly, or if you're making an absolute symlink; in both cases
$SELF
is an absolute path.However if one would create a symlink like that:
ln -s ../lib/whatever/bin/test_release bin/test_release
Script execution will fail:
Usecase:
Trying to make a binary package out of release folder requires either custom prefix (e.g. release folder is copied to
/opt/whatever
and thenPATH
is updated) or creating an absolute symlink to/usr/bin
or other prefix which is used on a target system.Relative symlink would allow much easier deployment of Mix.Releases, because it will eliminate post-install step which may not be available for a particular distribution method/system.
Thank you!
Expected behavior
Script works
The text was updated successfully, but these errors were encountered: