From 66558af51e7d9828fb4757388f05eaa3c213cf7e Mon Sep 17 00:00:00 2001 From: Aleksandr Chebotov <47745270+al-cheb@users.noreply.github.com> Date: Mon, 23 Nov 2020 13:51:46 +0300 Subject: [PATCH 1/3] Update Windows default shell --- .../reference/workflow-syntax-for-github-actions.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/content/actions/reference/workflow-syntax-for-github-actions.md b/content/actions/reference/workflow-syntax-for-github-actions.md index 32a0b64e5390..f8433987e57b 100644 --- a/content/actions/reference/workflow-syntax-for-github-actions.md +++ b/content/actions/reference/workflow-syntax-for-github-actions.md @@ -599,7 +599,8 @@ You can override the default shell settings in the runner's operating system usi | 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}` | | Windows | `cmd` | {% data variables.product.prodname_dotcom %} appends the extension `.cmd` to your script name and substitutes for `{0}`. | `%ComSpec% /D /E:ON /V:OFF /S /C "CALL "{0}""`. | -| Windows | `powershell` | This is the default shell used on Windows. The Desktop PowerShell. {% data variables.product.prodname_dotcom %} appends the extension `.ps1` to your script name. | `powershell -command ". '{0}'"`. | +| Windows | `pwsh` | This is the default shell used on Windows. The PowerShell Core. {% data variables.product.prodname_dotcom %} appends the extension `.ps1` to your script name. | `pwsh -command ". '{0}'"`. | +| Windows | `powershell` | The PowerShell Desktop. {% data variables.product.prodname_dotcom %} appends the extension `.ps1` to your script name. | `powershell -command ". '{0}'"`. | ##### Example running a script using bash @@ -628,6 +629,15 @@ steps: shell: pwsh ``` +##### Example running a script using PowerShell Desktop + +```yaml +steps: + - name: Display the path + run: echo ${env:PATH} + shell: powershell +``` + ##### Example running a python script ```yaml From f69adb8c525ccfadd8196014de7d60129197e82f Mon Sep 17 00:00:00 2001 From: Martin Lopes Date: Fri, 8 Jan 2021 12:19:41 +1000 Subject: [PATCH 2/3] Update content/actions/reference/workflow-syntax-for-github-actions.md --- content/actions/reference/workflow-syntax-for-github-actions.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/actions/reference/workflow-syntax-for-github-actions.md b/content/actions/reference/workflow-syntax-for-github-actions.md index 79a4bc84d69c..793820874f76 100644 --- a/content/actions/reference/workflow-syntax-for-github-actions.md +++ b/content/actions/reference/workflow-syntax-for-github-actions.md @@ -676,7 +676,7 @@ steps: shell: pwsh ``` -#### Example running a script using PowerShell Desktop +#### Example: Using PowerShell Desktop to run a script ```yaml steps: From 1befb88ca40ed6b6994f0cb5de433bc9b4b2a8aa Mon Sep 17 00:00:00 2001 From: Martin Lopes Date: Fri, 8 Jan 2021 17:45:10 +1000 Subject: [PATCH 3/3] Added note from tech review --- content/actions/reference/workflow-syntax-for-github-actions.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/actions/reference/workflow-syntax-for-github-actions.md b/content/actions/reference/workflow-syntax-for-github-actions.md index 793820874f76..903a097d2479 100644 --- a/content/actions/reference/workflow-syntax-for-github-actions.md +++ b/content/actions/reference/workflow-syntax-for-github-actions.md @@ -646,7 +646,7 @@ You can override the default shell settings in the runner's operating system usi | 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}` | | Windows | `cmd` | {% data variables.product.prodname_dotcom %} appends the extension `.cmd` to your script name and substitutes for `{0}`. | `%ComSpec% /D /E:ON /V:OFF /S /C "CALL "{0}""`. | -| Windows | `pwsh` | This is the default shell used on Windows. The PowerShell Core. {% data variables.product.prodname_dotcom %} appends the extension `.ps1` to your script name. | `pwsh -command ". '{0}'"`. | +| Windows | `pwsh` | This is the default shell used on Windows. The PowerShell Core. {% data variables.product.prodname_dotcom %} appends the extension `.ps1` to your script name. If your self-hosted Windows runner does not have _PowerShell Core_ installed, then _PowerShell Desktop_ is used instead.| `pwsh -command ". '{0}'"`. | | Windows | `powershell` | The PowerShell Desktop. {% data variables.product.prodname_dotcom %} appends the extension `.ps1` to your script name. | `powershell -command ". '{0}'"`. | #### Example running a script using bash