From d087a01da6ed4dfe24834b6052e42fee14941272 Mon Sep 17 00:00:00 2001 From: Nikola Jokic <97525037+nikola-jokic@users.noreply.github.com> Date: Thu, 21 Jul 2022 10:19:48 +0200 Subject: [PATCH 1/2] Clarify how the bash shell will be invoked if not specified explicitly for jobs..steps[*].shell --- .../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 65e0259043..44dcccc3af 100644 --- a/content/actions/using-workflows/workflow-syntax-for-github-actions.md +++ b/content/actions/using-workflows/workflow-syntax-for-github-actions.md @@ -538,7 +538,7 @@ You can override the default shell settings in the runner's operating system usi | Supported platform | `shell` parameter | Description | Command run internally | |--------------------|-------------------|-------------|------------------------| -| All | `bash` | The default shell on non-Windows platforms with a fallback to `sh`. When specifying a bash shell on Windows, the bash shell included with Git for Windows is used. | `bash --noprofile --norc -eo pipefail {0}` | +| All | `bash` | The default shell on non-Windows platforms with a fallback to `sh`. Bash will be invoked with `bash -e {0}` if the shell parameter is not specified explicitly. When specifying a bash shell on Windows, the bash shell included with Git for Windows is used. | `bash --noprofile --norc -eo pipefail {0}` | | All | `pwsh` | The PowerShell Core. {% data variables.product.prodname_dotcom %} appends the extension `.ps1` to your script name. | `pwsh -command ". '{0}'"` | | All | `python` | Executes the python command. | `python {0}` | | Linux / macOS | `sh` | The fallback behavior for non-Windows platforms if no shell is provided and `bash` is not found in the path. | `sh -e {0}` | From a64e57605be531fa700c5875529f92816e93166e Mon Sep 17 00:00:00 2001 From: Nikola Jokic <97525037+nikola-jokic@users.noreply.github.com> Date: Tue, 9 Aug 2022 16:32:43 +0200 Subject: [PATCH 2/2] Update content/actions/using-workflows/workflow-syntax-for-github-actions.md Co-authored-by: Eric Wieser --- .../using-workflows/workflow-syntax-for-github-actions.md | 3 ++- 1 file changed, 2 insertions(+), 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 44dcccc3af..157808851c 100644 --- a/content/actions/using-workflows/workflow-syntax-for-github-actions.md +++ b/content/actions/using-workflows/workflow-syntax-for-github-actions.md @@ -538,7 +538,8 @@ You can override the default shell settings in the runner's operating system usi | Supported platform | `shell` parameter | Description | Command run internally | |--------------------|-------------------|-------------|------------------------| -| All | `bash` | The default shell on non-Windows platforms with a fallback to `sh`. Bash will be invoked with `bash -e {0}` if the shell parameter is not specified explicitly. When specifying a bash shell on Windows, the bash shell included with Git for Windows is used. | `bash --noprofile --norc -eo pipefail {0}` | +| Linux / macOS | unspecified | The default shell on non-Windows platforms. Note that this runs a different command to when `bash` is specified explicitly. If `bash` is not found in the path, this is treated as `sh`. | `bash -e {0}` | +| All | `bash` | The default shell on non-Windows platforms with a fallback to `sh`. When specifying a bash shell on Windows, the bash shell included with Git for Windows is used. | `bash --noprofile --norc -eo pipefail {0}` | | All | `pwsh` | The PowerShell Core. {% data variables.product.prodname_dotcom %} appends the extension `.ps1` to your script name. | `pwsh -command ". '{0}'"` | | All | `python` | Executes the python command. | `python {0}` | | Linux / macOS | `sh` | The fallback behavior for non-Windows platforms if no shell is provided and `bash` is not found in the path. | `sh -e {0}` |