Skip to content

Commit f75b233

Browse files
junovellazubieta
authored andcommitted
make the compression field in the recipe optional
this should fix the faulty checks
1 parent 553717c commit f75b233

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

appimagebuilder/modules/prime/appimage_primer.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,9 @@ def _make_squashfs(self, appdir: pathlib.Path):
8787
# I think this is better than hardcoding the supported compressions
8888
# If the team behind AppImageKit adds a new compression
8989
# we wouldn't need to update the code and release a new version just for a new compression method
90-
if self.config.comp() != "None":
91-
command += [ "-comp", self.config.comp()]
90+
comp = self.config.comp() or "xz"
91+
if comp != "None":
92+
command += [ "-comp", comp]
9293
else:
9394
command += ["-no-compression"]
9495

appimagebuilder/orchestrator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ def _extract_v1_recipe_context(self, args, recipe):
178178
app_info=app_info,
179179
update_string=recipe.AppImage["update-information"]() or "guess",
180180
runtime_arch=recipe.AppImage.arch(),
181-
compression=recipe.AppImage.comp(),
181+
compression=recipe.AppImage.comp() or "xz",
182182
sign_key=recipe.AppImage["sign-key"]() or None,
183183
file_name=recipe.AppImage["file_name"] or None,
184184
)

appimagebuilder/recipe/schema.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ def __init__(self):
9393
self.v1_appimage = Schema(
9494
{
9595
"arch": str,
96-
"comp": str,
96+
Optional("comp"): str,
9797
Optional("update-information"): str,
9898
Optional("sign-key"): str,
9999
Optional("file_name"): str,

0 commit comments

Comments
 (0)