File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed
codex-rs/tui/src/notifications Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change 11use std:: io;
22use std:: process:: Command ;
33use std:: process:: Stdio ;
4- use std:: thread;
54
65use base64:: Engine as _;
76use base64:: engine:: general_purpose:: STANDARD as BASE64 ;
@@ -41,11 +40,14 @@ fn spawn_powershell(encoded_command: String) -> io::Result<()> {
4140 . stdout ( Stdio :: null ( ) )
4241 . stderr ( Stdio :: null ( ) ) ;
4342
44- let mut child = command. spawn ( ) ?;
45- thread:: spawn ( move || {
46- let _ = child. wait ( ) ;
47- } ) ;
48- Ok ( ( ) )
43+ let status = command. status ( ) ?;
44+ if status. success ( ) {
45+ Ok ( ( ) )
46+ } else {
47+ Err ( io:: Error :: other (
48+ format ! ( "{POWERSHELL_EXE} exited with status {status}" ) ,
49+ ) )
50+ }
4951}
5052
5153fn build_encoded_command ( encoded_title : & str , encoded_body : & str ) -> String {
You can’t perform that action at this time.
0 commit comments