[jira] [Commented] (SOLR-8946) bin/post script stdin detection is faulty
[ https://issues.apache.org/jira/browse/SOLR-8946?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15336846#comment-15336846 ] ASF subversion and git services commented on SOLR-8946: --- Commit 0b4a81eaae07a9e271c74f59f586075d3ee00ca1 in lucene-solr's branch refs/heads/branch_5x from [~dsmiley] [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=0b4a81e ] SOLR-8946: fix bin/post stdin detection. faulty on Ubuntu; maybe others (cherry picked from commit 7833f7f) > bin/post script stdin detection is faulty > - > > Key: SOLR-8946 > URL: https://issues.apache.org/jira/browse/SOLR-8946 > Project: Solr > Issue Type: Bug > Components: SimplePostTool >Affects Versions: 6.0 > Environment: Ubuntu >Reporter: David Smiley >Assignee: David Smiley > Fix For: 6.0.1, 6.1 > > Attachments: SOLR_8946.patch > > > Summary: I think the {{post}} bash script tries to detect stdin the wrong > way. > If I run "post -h" I see some examples, to include this: > {code} > echo '{commit: {}}' | bin/post -c my_collection -type application/json -out > yes -d > {code} > However if I try it, Solr returns this error: {{Cannot parse provided JSON: > JSON Parse Error: char=<,position=0 BEFORE='<' AFTER='add/>'}} > I see that {{post}} is sending an {{}} in certain cases, but it's not > supposed to when the mode is stdin. Looking closer, it appears to be because > of this line: > {{if [[ -s /dev/stdin ]]; then}} > If I change it to this (which I figured out after googling around; I'm no > bash expert!): > {{if [[ ! -t 0 ]]; then}} > Apparently '0' represents stdin. It works for me. [~thelabdude] might you > take a look? I'd be happy to add a formal patch & commit for this trivial > change but it really needs other eyes. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (SOLR-8946) bin/post script stdin detection is faulty
[ https://issues.apache.org/jira/browse/SOLR-8946?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15336845#comment-15336845 ] ASF subversion and git services commented on SOLR-8946: --- Commit 060902366027239832f532db4250f0d337c1cb96 in lucene-solr's branch refs/heads/branch_5_5 from [~dsmiley] [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=0609023 ] SOLR-8946: fix bin/post stdin detection. faulty on Ubuntu; maybe others (cherry picked from commit 7833f7f) > bin/post script stdin detection is faulty > - > > Key: SOLR-8946 > URL: https://issues.apache.org/jira/browse/SOLR-8946 > Project: Solr > Issue Type: Bug > Components: SimplePostTool >Affects Versions: 6.0 > Environment: Ubuntu >Reporter: David Smiley >Assignee: David Smiley > Fix For: 6.0.1, 6.1 > > Attachments: SOLR_8946.patch > > > Summary: I think the {{post}} bash script tries to detect stdin the wrong > way. > If I run "post -h" I see some examples, to include this: > {code} > echo '{commit: {}}' | bin/post -c my_collection -type application/json -out > yes -d > {code} > However if I try it, Solr returns this error: {{Cannot parse provided JSON: > JSON Parse Error: char=<,position=0 BEFORE='<' AFTER='add/>'}} > I see that {{post}} is sending an {{}} in certain cases, but it's not > supposed to when the mode is stdin. Looking closer, it appears to be because > of this line: > {{if [[ -s /dev/stdin ]]; then}} > If I change it to this (which I figured out after googling around; I'm no > bash expert!): > {{if [[ ! -t 0 ]]; then}} > Apparently '0' represents stdin. It works for me. [~thelabdude] might you > take a look? I'd be happy to add a formal patch & commit for this trivial > change but it really needs other eyes. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (SOLR-8946) bin/post script stdin detection is faulty
[ https://issues.apache.org/jira/browse/SOLR-8946?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15293292#comment-15293292 ] ASF subversion and git services commented on SOLR-8946: --- Commit b119ad60a1d0a58ae4e7a6be54dc3b119bd484b0 in lucene-solr's branch refs/heads/branch_6_0 from [~dsmiley] [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=b119ad6 ] SOLR-8946: fix bin/post stdin detection. faulty on Ubuntu; maybe others (cherry picked from commit 7833f7f) > bin/post script stdin detection is faulty > - > > Key: SOLR-8946 > URL: https://issues.apache.org/jira/browse/SOLR-8946 > Project: Solr > Issue Type: Bug > Components: SimplePostTool >Affects Versions: 6.0 > Environment: Ubuntu >Reporter: David Smiley >Assignee: David Smiley > Fix For: 6.1 > > Attachments: SOLR_8946.patch > > > Summary: I think the {{post}} bash script tries to detect stdin the wrong > way. > If I run "post -h" I see some examples, to include this: > {code} > echo '{commit: {}}' | bin/post -c my_collection -type application/json -out > yes -d > {code} > However if I try it, Solr returns this error: {{Cannot parse provided JSON: > JSON Parse Error: char=<,position=0 BEFORE='<' AFTER='add/>'}} > I see that {{post}} is sending an {{}} in certain cases, but it's not > supposed to when the mode is stdin. Looking closer, it appears to be because > of this line: > {{if [[ -s /dev/stdin ]]; then}} > If I change it to this (which I figured out after googling around; I'm no > bash expert!): > {{if [[ ! -t 0 ]]; then}} > Apparently '0' represents stdin. It works for me. [~thelabdude] might you > take a look? I'd be happy to add a formal patch & commit for this trivial > change but it really needs other eyes. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (SOLR-8946) bin/post script stdin detection is faulty
[ https://issues.apache.org/jira/browse/SOLR-8946?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15243947#comment-15243947 ] ASF subversion and git services commented on SOLR-8946: --- Commit e1a5665feeafd6cd891edff392e885aef648dbf5 in lucene-solr's branch refs/heads/branch_6x from [~dsmiley] [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=e1a5665 ] SOLR-8946: fix bin/post stdin detection. faulty on Ubuntu; maybe others (cherry picked from commit 7833f7f) > bin/post script stdin detection is faulty > - > > Key: SOLR-8946 > URL: https://issues.apache.org/jira/browse/SOLR-8946 > Project: Solr > Issue Type: Bug > Components: SimplePostTool >Affects Versions: 6.0 > Environment: Ubuntu >Reporter: David Smiley > Attachments: SOLR_8946.patch > > > Summary: I think the {{post}} bash script tries to detect stdin the wrong > way. > If I run "post -h" I see some examples, to include this: > {code} > echo '{commit: {}}' | bin/post -c my_collection -type application/json -out > yes -d > {code} > However if I try it, Solr returns this error: {{Cannot parse provided JSON: > JSON Parse Error: char=<,position=0 BEFORE='<' AFTER='add/>'}} > I see that {{post}} is sending an {{}} in certain cases, but it's not > supposed to when the mode is stdin. Looking closer, it appears to be because > of this line: > {{if [[ -s /dev/stdin ]]; then}} > If I change it to this (which I figured out after googling around; I'm no > bash expert!): > {{if [[ ! -t 0 ]]; then}} > Apparently '0' represents stdin. It works for me. [~thelabdude] might you > take a look? I'd be happy to add a formal patch & commit for this trivial > change but it really needs other eyes. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (SOLR-8946) bin/post script stdin detection is faulty
[ https://issues.apache.org/jira/browse/SOLR-8946?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15243946#comment-15243946 ] ASF subversion and git services commented on SOLR-8946: --- Commit 7833f7f69af4d143178b53879c53563a4bbc0cee in lucene-solr's branch refs/heads/master from [~dsmiley] [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=7833f7f ] SOLR-8946: fix bin/post stdin detection. faulty on Ubuntu; maybe others > bin/post script stdin detection is faulty > - > > Key: SOLR-8946 > URL: https://issues.apache.org/jira/browse/SOLR-8946 > Project: Solr > Issue Type: Bug > Components: SimplePostTool >Affects Versions: 6.0 > Environment: Ubuntu >Reporter: David Smiley > Attachments: SOLR_8946.patch > > > Summary: I think the {{post}} bash script tries to detect stdin the wrong > way. > If I run "post -h" I see some examples, to include this: > {code} > echo '{commit: {}}' | bin/post -c my_collection -type application/json -out > yes -d > {code} > However if I try it, Solr returns this error: {{Cannot parse provided JSON: > JSON Parse Error: char=<,position=0 BEFORE='<' AFTER='add/>'}} > I see that {{post}} is sending an {{}} in certain cases, but it's not > supposed to when the mode is stdin. Looking closer, it appears to be because > of this line: > {{if [[ -s /dev/stdin ]]; then}} > If I change it to this (which I figured out after googling around; I'm no > bash expert!): > {{if [[ ! -t 0 ]]; then}} > Apparently '0' represents stdin. It works for me. [~thelabdude] might you > take a look? I'd be happy to add a formal patch & commit for this trivial > change but it really needs other eyes. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (SOLR-8946) bin/post script stdin detection is faulty
[ https://issues.apache.org/jira/browse/SOLR-8946?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15227043#comment-15227043 ] Ramkumar Aiyengar commented on SOLR-8946: - +1 > bin/post script stdin detection is faulty > - > > Key: SOLR-8946 > URL: https://issues.apache.org/jira/browse/SOLR-8946 > Project: Solr > Issue Type: Bug > Components: SimplePostTool >Affects Versions: 6.0 > Environment: Ubuntu >Reporter: David Smiley > > Summary: I think the {{post}} bash script tries to detect stdin the wrong > way. > If I run "post -h" I see some examples, to include this: > {code} > echo '{commit: {}}' | bin/post -c my_collection -type application/json -out > yes -d > {code} > However if I try it, Solr returns this error: {{Cannot parse provided JSON: > JSON Parse Error: char=<,position=0 BEFORE='<' AFTER='add/>'}} > I see that {{post}} is sending an {{}} in certain cases, but it's not > supposed to when the mode is stdin. Looking closer, it appears to be because > of this line: > {{if [[ -s /dev/stdin ]]; then}} > If I change it to this (which I figured out after googling around; I'm no > bash expert!): > {{if [[ ! -t 0 ]]; then}} > Apparently '0' represents stdin. It works for me. [~thelabdude] might you > take a look? I'd be happy to add a formal patch & commit for this trivial > change but it really needs other eyes. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org