This commit is contained in:
Jephté Clain 2025-06-25 08:43:58 +04:00
parent 3e642b84bc
commit 12fe3a65a5

View File

@ -614,28 +614,29 @@ function container_exec() {
composer)
"$@"
;;
*)
SOPTS=+w:
LOPTS=chdir:
args="$(getopt -n "$MYNAME" -o "$SOPTS" -l "$LOPTS" -- "$@")" || exit 1; eval "set -- $args"
chdir=
action=
while [ $# -gt 0 ]; do
case "$1" in
--) shift; break;;
-w|--chdir) shift; chdir="$1";;
*) die "$1: option non configurée";;
esac
shift
done
[ $# -gt 0 ] || die "no command specified"
if [ -n "$chdir" ]; then
cd "$chdir" || exit 1
fi
exec "$@"
;;
esac
SOPTS=+w:
LOPTS=chdir:
args="$(getopt -n "$MYNAME" -o "$SOPTS" -l "$LOPTS" -- "$@")" || exit 1; eval "set -- $args"
chdir=
action=
while [ $# -gt 0 ]; do
case "$1" in
--) shift; break;;
-w|--chdir) shift; chdir="$1";;
*) die "$1: option non configurée";;
esac
shift
done
[ $# -gt 0 ] || die "no command specified"
if [ -n "$chdir" ]; then
cd "$chdir" || exit 1
fi
exec "$@"
}
################################################################################