From e34b84405060661f122408177a73b63722917394 Mon Sep 17 00:00:00 2001 From: Nikola Jokic <97525037+nikola-jokic@users.noreply.github.com> Date: Tue, 5 Jul 2022 10:26:21 +0200 Subject: [PATCH 1/2] Change docs around -eo pipefail when shell is not specified --- .../using-workflows/workflow-syntax-for-github-actions.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content/actions/using-workflows/workflow-syntax-for-github-actions.md b/content/actions/using-workflows/workflow-syntax-for-github-actions.md index 64500c95e880..711f1158c642 100644 --- a/content/actions/using-workflows/workflow-syntax-for-github-actions.md +++ b/content/actions/using-workflows/workflow-syntax-for-github-actions.md @@ -630,8 +630,8 @@ For information about the software included on GitHub-hosted runners, see "[Spec For built-in shell keywords, we provide the following defaults that are executed by {% data variables.product.prodname_dotcom %}-hosted runners. You should use these guidelines when running shell scripts. - `bash`/`sh`: - - Fail-fast behavior using `set -eo pipefail`: Default for `bash` and built-in `shell`. It is also the default when you don't provide an option on non-Windows platforms. - - You can opt out of fail-fast and take full control by providing a template string to the shell options. For example, `bash {0}`. + - Fail-fast behavior using `set -eo pipefail`: This option is set when `shell: bash` is specified explicitly. It is not applied by default. + - You can take full control over shell parameters by providing a template string to the shell options. For example, `bash {0}`. - sh-like shells exit with the exit code of the last command executed in a script, which is also the default behavior for actions. The runner will report the status of the step as fail/succeed based on this exit code. - `powershell`/`pwsh` From 2ec9640ca001ef7601c61891cf4538ab220e7961 Mon Sep 17 00:00:00 2001 From: Martin Lopes Date: Tue, 12 Jul 2022 14:40:25 +1000 Subject: [PATCH 2/2] Apply suggestions from code review --- .../using-workflows/workflow-syntax-for-github-actions.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/actions/using-workflows/workflow-syntax-for-github-actions.md b/content/actions/using-workflows/workflow-syntax-for-github-actions.md index 711f1158c642..3ad4ab4880e3 100644 --- a/content/actions/using-workflows/workflow-syntax-for-github-actions.md +++ b/content/actions/using-workflows/workflow-syntax-for-github-actions.md @@ -630,7 +630,7 @@ For information about the software included on GitHub-hosted runners, see "[Spec For built-in shell keywords, we provide the following defaults that are executed by {% data variables.product.prodname_dotcom %}-hosted runners. You should use these guidelines when running shell scripts. - `bash`/`sh`: - - Fail-fast behavior using `set -eo pipefail`: This option is set when `shell: bash` is specified explicitly. It is not applied by default. + - Fail-fast behavior using `set -eo pipefail`: This option is set when `shell: bash` is explicitly specified. It is not applied by default. - You can take full control over shell parameters by providing a template string to the shell options. For example, `bash {0}`. - sh-like shells exit with the exit code of the last command executed in a script, which is also the default behavior for actions. The runner will report the status of the step as fail/succeed based on this exit code.