Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id D540E200D26 for ; Fri, 6 Oct 2017 01:24:05 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id D37FE160BDA; Thu, 5 Oct 2017 23:24:05 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 25AB61609E2 for ; Fri, 6 Oct 2017 01:24:04 +0200 (CEST) Received: (qmail 36864 invoked by uid 500); 5 Oct 2017 23:24:04 -0000 Mailing-List: contact dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@lucene.apache.org Delivered-To: mailing list dev@lucene.apache.org Received: (qmail 36854 invoked by uid 99); 5 Oct 2017 23:24:03 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 05 Oct 2017 23:24:03 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 2D2C91A3C1B for ; Thu, 5 Oct 2017 23:24:03 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -99.201 X-Spam-Level: X-Spam-Status: No, score=-99.201 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_SHORT=0.001, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id fK6EWDj0PCTe for ; Thu, 5 Oct 2017 23:24:02 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 8E85B5FDEA for ; Thu, 5 Oct 2017 23:24:01 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id A4F62E0BCA for ; Thu, 5 Oct 2017 23:24:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 2CC822432F for ; Thu, 5 Oct 2017 23:24:00 +0000 (UTC) Date: Thu, 5 Oct 2017 23:24:00 +0000 (UTC) From: "Hoss Man (JIRA)" To: dev@lucene.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (SOLR-11441) windows shell splits args on "=" so we should consider updating our docs to always quote args like -Dfoo=bar or improve bin/solr.cmd to account for this MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Thu, 05 Oct 2017 23:24:06 -0000 [ https://issues.apache.org/jira/browse/SOLR-11441?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16193899#comment-16193899 ] Hoss Man commented on SOLR-11441: --------------------------------- according to that (totally non-official) URL, it's the automatic behavior inside of of any CMD script. I'm not sure if comparing bin/solr.cmd to ant.bat is really an apples to apples comparison though -- in this example we're expecting {{-Dsolr.ltr.enabled=true}} to be passed to solr.cmd as a single String so that when we're looping over the args we can see it starts with "-D" and we know we should pass the whole thing as is to jetty when running java.exe. In the ant.bat case, if you passed {{-Dsolr.ltr.enabled=true}} to ant, the ant.bat file is (probably?) designed around the assumption that it's getting key=val pairs -- which it's fine with because it's just going to put all of them in the arg list that it passes to java.exe when running the Launcher class. ... yeah -- Launcher.java/Main.java in ant seem to be explicitly designed with the assumption that the OS might throw away the "=" and split the args... https://github.com/apache/ant/blob/master/src/main/org/apache/tools/ant/Main.java#L551 > windows shell splits args on "=" so we should consider updating our docs to always quote args like -Dfoo=bar or improve bin/solr.cmd to account for this > -------------------------------------------------------------------------------------------------------------------------------------------------------- > > Key: SOLR-11441 > URL: https://issues.apache.org/jira/browse/SOLR-11441 > Project: Solr > Issue Type: Bug > Security Level: Public(Default Security Level. Issues are Public) > Components: documentation, scripts and tools > Environment: Windows 10, possible other versions as well (presumably not when running cygwin?) > Reporter: Hoss Man > > confusing exchange with a user on freenode#solr led to this discovery... > {noformat} > 14:07 < sara_:#solr> New question: bin/solr start -e techproducts -Dsolr.ltr.enabled=true > 14:07 < sara_:#solr> gave me invalid command-line option:true > 14:07 < sara_:#solr> anyone knows why? > ... > 15:02 < sara_:#solr> i have 6.6.1 @elyograg > 15:03 < sara_:#solr> mine is a windows 10 machine > ... > 15:28 < sara_:#solr> @elyograg i just downloaded solr-7.0.0 and ran bin/solr start -e techproducts -Dsolr.ltr.enabled=true > 15:28 < sara_:#solr> it still gave me invalid command-line > ... > 15:29 <@hoss:#solr> sara_: the only thing i can think of is that windows 10 is splitting your command line on '=' ? ... can you try > quoting the entire command line arg so the script gets the entire -Dsolr.ltr.enabled=true ? (not sure how to quote > strings in the windows command shell -- i would assume "-Dsolr.ltr.enabled=true" > 15:32 <@hoss:#solr> sigh ... yes, aparently windows things "=" is a shell delimiter: https://ss64.com/nt/syntax-esc.html > 15:33 <@hoss:#solr> s/shell delimiter/parameter delimiter in shell commands/ > 15:33 < sara_:#solr> you are genius! > 15:34 < sara_:#solr> you and elyograg. you guys are fantastic. Saving me from looking at the cmd script or shell script.... > 15:34 <@hoss:#solr> sara_: do i have your permission to copy/paste this exchange into our bug tracker as a note about updating our docs > (and maybe making the solr.cmd smart enough to handle this) ? > 15:45 < sara_:#solr> sure of course > {noformat} -- This message was sent by Atlassian JIRA (v6.4.14#64029) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org For additional commands, e-mail: dev-help@lucene.apache.org