Merged
Conversation
Member
|
Concept ACK. It seems the proper way to achieve |
Member
|
Is there a way to turn the warning into an error? We use dash in the CI, but no one is going to read the logs to find those errors. See https://cirrus-ci.com/task/5279449093505024?logs=ci#L1704 |
Contributor
Author
On my Gentoo system, because this particular mistake is so common, I have a post-configure check on all builds: It's a brittle check, but it's helped me catch and fix at least a dozen Bashisms in various packages. |
Contributor
|
ACK cf72925. |
Member
|
Code review ACK cf72925 Obvious agree that it would be good if these kind of errors were actually fatal errors. |
sidhujag
pushed a commit
to syscoin/syscoin
that referenced
this pull request
Nov 22, 2021
cf72925 configure.ac: remove Bashism (Matt Whitlock) Pull request description: Configure scripts are supposed to adhere to the POSIX shell language. The POSIX `test` builtin does not implement an `==` operator. Bash does, but not all systems have Bash installed as `/bin/sh`. In particular, many systems use the lighter-weight Dash as the default POSIX shell. Dash emits the following error when running `configure`: ``` ./configure: 39065: test: xno: unexpected operator ``` This PR removes the Bashism and restores correct operation with POSIX-compliant shells like Dash. ACKs for top commit: katesalazar: ACK cf72925. laanwj: Code review ACK cf72925 Tree-SHA512: 578c873fba52e0472baed9e024bddcf58a0e088600bd5854f3011f1f8d135773ad923bb16baefc960d17ecedee9cc980b36aaa70fb32eb9bc7de93f7fe60541d
sidhujag
pushed a commit
to syscoin/syscoin
that referenced
this pull request
Nov 23, 2021
cf72925 configure.ac: remove Bashism (Matt Whitlock) Pull request description: Configure scripts are supposed to adhere to the POSIX shell language. The POSIX `test` builtin does not implement an `==` operator. Bash does, but not all systems have Bash installed as `/bin/sh`. In particular, many systems use the lighter-weight Dash as the default POSIX shell. Dash emits the following error when running `configure`: ``` ./configure: 39065: test: xno: unexpected operator ``` This PR removes the Bashism and restores correct operation with POSIX-compliant shells like Dash. ACKs for top commit: katesalazar: ACK cf72925. laanwj: Code review ACK cf72925 Tree-SHA512: 578c873fba52e0472baed9e024bddcf58a0e088600bd5854f3011f1f8d135773ad923bb16baefc960d17ecedee9cc980b36aaa70fb32eb9bc7de93f7fe60541d
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Configure scripts are supposed to adhere to the POSIX shell language. The POSIX
testbuiltin does not implement an==operator. Bash does, but not all systems have Bash installed as/bin/sh. In particular, many systems use the lighter-weight Dash as the default POSIX shell. Dash emits the following error when runningconfigure:This PR removes the Bashism and restores correct operation with POSIX-compliant shells like Dash.