File tree Expand file tree Collapse file tree 2 files changed +10
-5
lines changed
ResourceManager/Utilities Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -99,16 +99,20 @@ public ProcessOutput Invoke(ProcessInput input)
99
99
}
100
100
}
101
101
102
+ var stderr = new StringBuilder ( ) ;
103
+ proc . ErrorDataReceived += ( sender , e ) => stderr . AppendLine ( e . Data ) ;
102
104
proc . Start ( ) ;
103
- var stdout = proc . StandardOutput . ReadToEnd ( ) ;
104
- var stderr = proc . StandardError . ReadToEnd ( ) ;
105
+
106
+ // To avoid deadlocks, use an asynchronous read operation on at least one of the streams.
107
+ proc . BeginErrorReadLine ( ) ;
108
+ var stdout = proc . StandardOutput . ReadToEnd ( ) ;
105
109
proc . WaitForExit ( ) ;
106
-
110
+
107
111
return new ProcessOutput {
108
112
Stdout = stdout ,
109
- Stderr = stderr ,
113
+ Stderr = stderr . ToString ( ) ,
110
114
ExitCode = proc . ExitCode
111
115
} ;
112
116
}
113
117
}
114
- }
118
+ }
Original file line number Diff line number Diff line change 19
19
-->
20
20
21
21
## Upcoming Release
22
+ * Fixed deadlock in Bicep CLI execution. [ #24133 ]
22
23
23
24
## Version 6.15.0
24
25
* Supported ` -SkipClientSideScopeValidation ` in RoleAssignment and RoleDefinition related commands. [ #22473 ]
You can’t perform that action at this time.
0 commit comments