mirror of
				https://github.com/esphome/esphome.git
				synced 2025-10-30 22:53:59 +00:00 
			
		
		
		
	Fix return value of run_external_command (#5657)
This commit is contained in:
		| @@ -222,7 +222,7 @@ def run_external_command( | ||||
|     try: | ||||
|         sys.argv = list(cmd) | ||||
|         sys.exit = mock_exit | ||||
|         return func() or 0 | ||||
|         retval = func() or 0 | ||||
|     except KeyboardInterrupt:  # pylint: disable=try-except-raise | ||||
|         raise | ||||
|     except SystemExit as err: | ||||
| @@ -239,9 +239,10 @@ def run_external_command( | ||||
|         sys.stderr = orig_stderr | ||||
|  | ||||
|     if capture_stdout: | ||||
|             # pylint: disable=lost-exception | ||||
|         return cap_stdout.getvalue() | ||||
|  | ||||
|     return retval | ||||
|  | ||||
|  | ||||
| def run_external_process(*cmd, **kwargs): | ||||
|     full_cmd = " ".join(shlex_quote(x) for x in cmd) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user