Reposition os.execve call to enable debug logging before child process termination (#2593)

* Update Spanish translation for 'greeter'

* Moved the os.execve call below the debug logging statement in SysCommandWorker
This commit is contained in:
Daniel E Rodriguez Rivera 2024-07-28 17:16:46 -05:00 committed by GitHub
parent 0e8efecfa1
commit 3bdead0390
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -320,10 +320,10 @@ class SysCommandWorker:
error(f"Unexpected {exception_type} occurred in {self.cmd}: {e}")
raise e
os.execve(self.cmd[0], list(self.cmd), {**os.environ, **self.environment_vars})
if storage['arguments'].get('debug'):
if storage.get('arguments', {}).get('debug'):
debug(f"Executing: {self.cmd}")
os.execve(self.cmd[0], list(self.cmd), {**os.environ, **self.environment_vars})
except FileNotFoundError:
error(f"{self.cmd[0]} does not exist.")
self.exit_code = 1