Skip to content

Commit 66558af

Browse files
authored
Update Windows default shell
1 parent e6fd5ca commit 66558af

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

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

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

604605
##### Example running a script using bash
605606

@@ -628,6 +629,15 @@ steps:
628629
shell: pwsh
629630
```
630631

632+
##### Example running a script using PowerShell Desktop
633+
634+
```yaml
635+
steps:
636+
- name: Display the path
637+
run: echo ${env:PATH}
638+
shell: powershell
639+
```
640+
631641
##### Example running a python script
632642

633643
```yaml

0 commit comments

Comments
 (0)