Run a shell command silently, capturing output but not displaying it.
(command)
| 300 | |
| 301 | |
| 302 | def run_silent_command(command): |
| 303 | """Run a shell command silently, capturing output but not displaying it.""" |
| 304 | try: |
| 305 | result = subprocess.run(command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True) |
| 306 | return result.stdout.strip() |
| 307 | except subprocess.CalledProcessError: |
| 308 | return None |
| 309 | |
| 310 | |
| 311 | def check_and_install_poppler(): |
no outgoing calls
no test coverage detected