mirror of
https://github.com/parchlinux/calamares.git
synced 2025-06-28 09:55:37 -04:00
Make sure to check things exist before actually modifying them
This fixes crashes when a system does not have squashfs-tools or a grub dir does not exist.
This commit is contained in:
parent
9c10b49802
commit
eed387f7a4
2 changed files with 9 additions and 2 deletions
|
@ -123,6 +123,10 @@ class UnpackOperation:
|
|||
fslist = ""
|
||||
|
||||
if entry.sourcefs == "squashfs":
|
||||
if shutil.which("unsquashfs") == None:
|
||||
return ("Failed to unpack image", "Failed to find unsquashfs, make sure you have
|
||||
the squashfs-tools package installed")
|
||||
|
||||
fslist = subprocess.check_output(["unsquashfs",
|
||||
"-l",
|
||||
entry.source])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue