[
https://issues.apache.org/jira/browse/SOLR-8877?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15202799#comment-15202799
]
ASF subversion and git services commented on SOLR-8877:
-------------------------------------------------------
Commit e3b7d82825715a2162928c66d1c8e5e0133f7227 in lucene-solr's branch
refs/heads/master from [~thetaphi]
[ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=e3b7d82 ]
SOLR-8877: Disable test on environments with whitespace
> SolrCLI.java and corresponding test does not work with whitespace in path
> -------------------------------------------------------------------------
>
> Key: SOLR-8877
> URL: https://issues.apache.org/jira/browse/SOLR-8877
> Project: Solr
> Issue Type: Bug
> Components: scripts and tools
> Affects Versions: 5.5, 6.0
> Reporter: Uwe Schindler
> Attachments: SOLR-8877.patch
>
>
> The SolrCLI and the corresponding test use CommandLine.parse() of
> commons-exec, but in most cases the parameters are not correctly escaped.
> CommandLine.parse() should be placed on forbidden-apis list. This is *not* a
> valid way to build a command line and execute it. The correct war is to
> create an instance of the CommandLine class and then add the arguments one-by
> one:
> {code:java}
> org.apache.commons.exec.CommandLine startCmd = new
> org.apache.commons.exec.CommandLine(callScript);
> startCmd.addArguments(new String[] {
> "start",
> callScript,
> "-p",
> Integer.toString(port),
> "-s",
> solrHome,
> hostArg,
> zkHostArg,
> memArg,
> extraArgs,
> addlOptsArg
> });
> {code}
> I tried to fix it by using the approach, but the test then fails with other
> bugs on Windows. I disabled it for now if it detects whitespace in Solr's
> path. I think the reason might be that some of the above args are empty or
> are multi-args on itsself, so they get wrongly escaped.
> I have no idea how to fix it, but the current way fails completely on
> Windows, where most users have a whitespace in their home directory or in the
> "C:\Program Files" folder.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]