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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this needed? Does Debian use some other executable?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, Debian uses Dash when scripts are run with /bin/sh, and that does not support
pipefail
as option:There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, this task copies files, and we can use the
copy
module instead of usingshell
. There is an old #2 that nobody looked at for years, but it has some good code that would fix this. Can you use it here?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also - if we do want to keep the
shell
- instead of using a different executable, this is how we solve thepipefail
issue with other system roles - https://github.com/linux-system-roles/timesync/blob/main/tests/tests_ntp_provider3.yml#L52-L55 e.g. check ifpipefail
is a supported option, and set it if it isThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am about to merge #2, which will fix the issue with pipefail. This PR now lacks adding compatibility with Debian in meta/main.yml, like in https://github.com/linux-system-roles/ssh/blob/main/meta/main.yml#L18-L23
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool, that will also fix it :)
Shall I close this one then?