Skip to content

Commit 0a5282c

Browse files
author
Sean Wheeler
committed
Review feedback
1 parent 9e43a44 commit 0a5282c

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

reference/7/Microsoft.PowerShell.Core/About/about_Pipeline_Chain_Operators.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ Describes chaining pipelines with the `&&` and `||` operators in PowerShell.
1414

1515
## Long description
1616

17+
> [!NOTE]
18+
> This is an experimental feature. For more information see
19+
> [about_Experimental_Features](about_Experimental_Features.md).
20+
1721
Beginning in PowerShell 7, PowerShell implements the `&&` and `||` operators to
1822
conditionally chain pipelines. These operators are known in PowerShell as
1923
*pipeline chain operators*, and are similar to
@@ -26,7 +30,10 @@ The `&&` operator executes the right-hand pipeline, if the left-hand pipeline
2630
succeeded. Conversely, the `||` operator executes the right-hand pipeline if
2731
the left-hand pipeline failed.
2832

29-
This can be use for conditional execution of software deployments. For example:
33+
These operators use the `$?` and `$LASTEXITCODE` variable to determine if a
34+
pipeline failed. This allows you to use them with native command and not just
35+
with cmdlets or functions. This can be use for conditional execution of
36+
software deployments. For example:
3037

3138
```powershell
3239
npm run build && npm run deploy
@@ -35,10 +42,6 @@ npm run build && npm run deploy
3542
In this example the `npm run deploy` command only runs if the build command
3643
succeeds.
3744

38-
> [!NOTE]
39-
> This is an experimental feature. For more information see
40-
> [about_Experimental_Features](about_Experimental_Features.md).
41-
4245
### Examples
4346

4447
#### Two successful commands

0 commit comments

Comments
 (0)