We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d9b173c commit bd69a2aCopy full SHA for bd69a2a
synthtool/gcp/templates/java_library/.kokoro/common.sh
@@ -13,18 +13,28 @@
13
# See the License for the specific language governing permissions and
14
# limitations under the License.
15
16
-# set -eo pipefail
17
-
18
function retry_with_backoff {
19
attempts_left=$1
20
sleep_seconds=$2
21
shift 2
22
command=$@
23
+
+ # store current flag state
24
+ flags=$-
25
26
+ # allow a failures to continue
27
+ set +e
28
echo "${command}"
29
${command}
30
exit_code=$?
31
32
+ # restore "e" flag
33
+ if [[ ${flags} =~ e ]]
34
+ then set -e
35
+ else set +e
36
+ fi
37
38
if [[ $exit_code == 0 ]]
39
then
40
return 0
0 commit comments