-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Orb version: 1.0.0
What happened:
When opening a PR with many commits (~400, in my case, due to importing another repo), the orb fails more or less silently with an exit code 141.
The underlying reason for this is that CircleCI runs /bin/bash -eo pipefail as the default shell, with which the lint script is being invoked.
Then, this command fails because it's using head, which closes the (reading end of) the pipe before git cherry returned all the data, which makes the whole pipeline fail.
This only happens for PRs with many commits, as otherwise git cherry returns before head closes the pipe.
There's a couple of different options to mitigate the issue:
- The orb could specify the
shellparameter in it'srunblock and set it to something like/bin/bashonly. This will turn offpipefailglobally. - The script itself could turn off
pipefailwith aset +o pipefailanywhere within the script, potentially even right before the offending line, and potentially also turn it on again directly afterwards with aset -o pipefail - The script could use a different command than
head, one that doesn't close the pipe before all data is read. For example,sedcould be used.
I'm happy to open a PR for any of these, but wanted to inquire as to if there's any preference for the solution!
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working