File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -139,13 +139,19 @@ pub async fn install() -> Result<String, String> {
139139
140140 let stdout = String :: from_utf8_lossy ( & output. stdout ) . to_string ( ) ;
141141 let stderr = String :: from_utf8_lossy ( & output. stderr ) . to_string ( ) ;
142+ let combined = format ! ( "{}\n {}" , stdout, stderr) ;
142143
143- if output. status . success ( ) {
144+ // Check if the binary actually exists (installer may exit non-zero due to
145+ // harmless shell issues like unbound variables even when install succeeded)
146+ if is_installed ( ) {
144147 info ! ( "WolfUSB: installed successfully" ) ;
145- Ok ( format ! ( "{}\n {}" , stdout, stderr) )
148+ Ok ( combined)
149+ } else if output. status . success ( ) {
150+ info ! ( "WolfUSB: installed successfully" ) ;
151+ Ok ( combined)
146152 } else {
147153 warn ! ( "WolfUSB: installation failed" ) ;
148- Err ( format ! ( "Installation failed:\n {}\n {} " , stdout , stderr ) )
154+ Err ( format ! ( "Installation failed:\n {}" , combined ) )
149155 }
150156}
151157
You can’t perform that action at this time.
0 commit comments