DSC
DSC copied to clipboard
Piping sometimes does not work on Linux
Prerequisites
- [X] Write a descriptive title.
- [X] Make sure you are able to repro it on the latest version
- [X] Search the existing issues.
Steps to reproduce
This was seen only on CI machines. Test failure in export test case that is doing dsc config export | dsc config set.
On local VMs this does not repro.
Error: IO: Broken pipe (os error 32)
Error: [-] resource export tests.Configuration Export can be piped to configuration Set 5.09s (5.09s|3ms)
Message
Expected 0, but got 2.
at $LASTEXITCODE | Should -Be 0, /home/runner/work/DSC/DSC/dsc/tests/dsc_export.tests.ps1:49
at <ScriptBlock>, /home/runner/work/DSC/DSC/dsc/tests/dsc_export.tests.ps1:49
Expected behavior
`dsc config export | dsc config set` always runs fine.
Actual behavior
Error above.
Error details
No response
Environment data
Linux CI VM.
Version
v1
Visuals
No response
A broken pipe probably means that upstream dsc config export didn't exit cleanly and broke the pipe. Maybe we need to add tracing to how dsc handles child processes that don't exit cleanly (such as if the process test process panic'd).