From 12fe3a65a54d8cff893902188b5c047527a06180 Mon Sep 17 00:00:00 2001 From: Jephte Clain Date: Wed, 25 Jun 2025 08:43:58 +0400 Subject: [PATCH] bug --- runphp/runphp | 43 ++++++++++++++++++++++--------------------- 1 file changed, 22 insertions(+), 21 deletions(-) diff --git a/runphp/runphp b/runphp/runphp index 74c682a..30f3056 100755 --- a/runphp/runphp +++ b/runphp/runphp @@ -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 "$@" } ################################################################################