tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Romain Manni-Bucau (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (OPENEJB-2065) Change 1482211 causes shell error if bin/openejb is given more than one argument
Date Mon, 06 Jan 2014 06:35:55 GMT

     [ https://issues.apache.org/jira/browse/OPENEJB-2065?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Romain Manni-Bucau resolved OPENEJB-2065.
-----------------------------------------

    Resolution: Fixed

Thanks for this review, debug was originally just a dev command but you made it a user one!
awesome!

> Change 1482211 causes shell error if bin/openejb is given more than one argument
> --------------------------------------------------------------------------------
>
>                 Key: OPENEJB-2065
>                 URL: https://issues.apache.org/jira/browse/OPENEJB-2065
>             Project: OpenEJB
>          Issue Type: Bug
>    Affects Versions: 4.6.0
>         Environment: Any OS with a POSIX shell (sh, ksh, bash, etc) 
>            Reporter: Bill Cole
>            Assignee: Romain Manni-Bucau
>              Labels: easyfix
>             Fix For: 4.6.1
>
>         Attachments: openejb.patch
>
>   Original Estimate: 5m
>  Remaining Estimate: 5m
>
> $@ is always word-split, even inside doublequotes. Hence line 83:
> if [ "x$@" = "xdebug" ]; then
> throws a shell syntax error (in bash "too many arguments", in BSD sh "unexpected operator"
) if the script is given multiple arguments (such as those documented in README.txt) because
"x$@" is expanded to  x$1 $2 [...] $n NOT "x$1 $2 [...] $n"
> The cleanest fix is to change line 83 to:
> if [ "$1" = "debug" ]; then
> This is a precise check for whether the first argument to the script is "debug" and clearly
that's the only relevant argument in such a case, as the "then" clause causes any other args
to be ignored. 



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Mime
View raw message