Only call gpt under macOS

This commit is contained in:
2Shirt 2022-10-08 19:30:05 -07:00
parent f0d0ea8164
commit f1e29cd0c8
Signed by: 2Shirt
GPG key ID: 152FAC923B0E132C

View file

@ -6,6 +6,7 @@ import atexit
import logging import logging
import os import os
import pathlib import pathlib
import platform
import subprocess import subprocess
import time import time
@ -281,6 +282,7 @@ class State():
for test in disk.tests: for test in disk.tests:
_f.write(f'\n{test.name}:\n') _f.write(f'\n{test.name}:\n')
_f.write('\n'.join(debug.generate_object_report(test, indent=1))) _f.write('\n'.join(debug.generate_object_report(test, indent=1)))
if platform.system() == 'Darwin':
cmd = [( cmd = [(
f'sudo gpt -r show "{disk.path}"' f'sudo gpt -r show "{disk.path}"'
f' >> {debug_dir}/gpt_{disk.path.name}.info' f' >> {debug_dir}/gpt_{disk.path.name}.info'