New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix issue where expr fails on freebsd. #5013

Merged
merged 1 commit into from Jan 29, 2018

Conversation

Projects
None yet
3 participants
@arjanvandervelde
Contributor

arjanvandervelde commented Jan 26, 2018

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.

fix issue where expr fails on freebsd.
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

This comment has been minimized.

Contributor

arjanvandervelde commented Jan 27, 2018

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

1 check failed

continuous-integration/travis-ci/pr The Travis CI build could not complete due to an error
Details
@enebo

This comment has been minimized.

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

This comment has been minimized.

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

Test expr behavior before using --. Fixes #5091
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