Skip to content

Commit 880d86d

Browse files
author
Martin Lopes
authored
Merge pull request #1558 from al-cheb/al-cheb/windows-default-shell
Update Windows default shell
2 parents 54ae53c + eef64d6 commit 880d86d

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

content/actions/reference/workflow-syntax-for-github-actions.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -646,7 +646,8 @@ You can override the default shell settings in the runner's operating system usi
646646
| All | `python` | Executes the python command. | `python {0}` |
647647
| 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}` |
648648
| 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}""`. |
649-
| 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}'"`. |
649+
| 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}'"`. |
650+
| Windows | `powershell` | The PowerShell Desktop. {% data variables.product.prodname_dotcom %} appends the extension `.ps1` to your script name. | `powershell -command ". '{0}'"`. |
650651

651652
#### Example running a script using bash
652653

@@ -675,6 +676,15 @@ steps:
675676
shell: pwsh
676677
```
677678

679+
#### Example: Using PowerShell Desktop to run a script
680+
681+
```yaml
682+
steps:
683+
- name: Display the path
684+
run: echo ${env:PATH}
685+
shell: powershell
686+
```
687+
678688
#### Example running a python script
679689

680690
```yaml

0 commit comments

Comments
 (0)