Skip to content

fix issue where expr fails on freebsd.#5013

Merged
enebo merged 1 commit intojruby:masterfrom
arjanvandervelde:master
Jan 29, 2018
Merged

fix issue where expr fails on freebsd.#5013
enebo merged 1 commit intojruby:masterfrom
arjanvandervelde:master

Conversation

@arjanvandervelde
Copy link
Contributor

These scripts produce errors when run on FreeBSD (in the context of logstash). Adding the double dash prevents interpretation of the left operand as an option to expr itself. See also https://discuss.elastic.co/t/cannot-install-multiline-filter-on-freebsd-11/106929?source_topic_id=117201.

In particular, the culprit in the logstash issue was line

if expr "$val" : '.*[.]' > /dev/null; then
expanding to "expr -C : .[.*]".

Thanks.

These scripts produce errors when run on FreeBSD (in the context of logstash). Adding the double dash prevents interpretation of the left operand as an option to expr itself. See also https://discuss.elastic.co/t/cannot-install-multiline-filter-on-freebsd-11/106929?source_topic_id=117201.
@arjanvandervelde
Copy link
Contributor Author

too bad that timed out

@enebo enebo modified the milestones: JRuby 9.2.0.0, JRuby 9.1.16.0 Jan 29, 2018
@enebo enebo merged commit 9a9d63e into jruby:master Jan 29, 2018
@enebo
Copy link
Member

enebo commented Jan 29, 2018

@arjanvandervelde our 9.1.x is on the branch jruby-9.1 but that is far from obvious so I will just cherry-pick this over there.

@headius
Copy link
Member

headius commented Mar 19, 2018

This fix appears to cause issues on Alpine Linux due to some incompatibility with the expr command. See #5091.

headius added a commit that referenced this pull request Mar 19, 2018
In #5013 we modified our bash script to use -- when calling the
`expr` command, but this form is not supported on Alpine Linux's
version of expr. This patch tests the behavior of `expr --` to
determine which form to use.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants