karaf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jean-Baptiste Onofré (JIRA) <j...@apache.org>
Subject [jira] [Commented] (KARAF-3964) cygpath call in "start" to convert CLASSPATH should first verify it's set
Date Fri, 09 Oct 2015 12:53:26 GMT

    [ https://issues.apache.org/jira/browse/KARAF-3964?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14950324#comment-14950324

Jean-Baptiste Onofré commented on KARAF-3964:

Fixed on master: https://git-wip-us.apache.org/repos/asf?p=karaf.git;a=commitdiff;h=cc455cc7cb0759a8cf7c9d388418469661e4ff64

> cygpath call in "start" to convert CLASSPATH should first verify it's set
> -------------------------------------------------------------------------
>                 Key: KARAF-3964
>                 URL: https://issues.apache.org/jira/browse/KARAF-3964
>             Project: Karaf
>          Issue Type: Bug
>          Components: karaf-core
>         Environment: Windows 7, Cygwin
>            Reporter: David M. Karr
>            Assignee: Jean-Baptiste Onofré
>            Priority: Trivial
>             Fix For: 4.0.2, 3.0.6
> Several of the Karaf scripts have "if $cygwin" blocks that convert some variables to
Windows form. If the variable referenced is not set, cygpath will fail with "cygpath: can't
convert empty path".  The impact is debatable, as the variable after the command will be unset,
same as before it, but the error message can be confusing for users.
> Most of these cases are likely dealt with, but one that is not is in the "start" script,
for the "CLASSPATH" variable.  I don't set a global CLASSPATH value, and I believe it's generally
a bad idea to set one.
> The most reasonable fix is to simply not run cygpath if CLASSPATH is not set or is empty.
 Therefore, change this:
> CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
> to:
> if [ ! -z "$CLASSPATH" ]; then
>     CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
> fi

This message was sent by Atlassian JIRA

View raw message