summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xscripts/runqemu3
1 files changed, 1 insertions, 2 deletions
diff --git a/scripts/runqemu b/scripts/runqemu
index 827300080a..4fb85177e3 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -448,8 +448,7 @@ class BaseConfig(object):
448 if not shutil.which('zstd'): 448 if not shutil.which('zstd'):
449 raise RunQemuError(f"'zstd' is required to decompress {self.rootfs} but was not found in PATH") 449 raise RunQemuError(f"'zstd' is required to decompress {self.rootfs} but was not found in PATH")
450 try: 450 try:
451 with open(uncompressed_path, 'wb') as out_file: 451 subprocess.check_call(['zstd', '-d', image_path, '-o', uncompressed_path])
452 subprocess.check_call(['zstd', '-d', '-c', image_path], stdout=out_file)
453 except subprocess.CalledProcessError as e: 452 except subprocess.CalledProcessError as e:
454 self.cleanup_files.append(uncompressed_path) 453 self.cleanup_files.append(uncompressed_path)
455 raise RunQemuError(f"Failed to decompress {self.rootfs}: {e}") 454 raise RunQemuError(f"Failed to decompress {self.rootfs}: {e}")