mirror of
https://github.com/arcan1s/ahriman.git
synced 2026-11-26 18:19:30 +00:00
fix: handle empty assignment correctly in PKGBUILD
This commit is contained in:
1 parent
2080f1e06f
commit
27cfcd07eb
3 files changed
+251
-163
No files matched your search
@@ -169,6 +169,11 @@ class PkgbuildParser(Iterable[PkgbuildPatch]):
|
||||
value = cast(Node, node.child_by_field_name(PkgbuildNodeField.Value))
|
||||
key = self._text(name)
|
||||
|
||||
# bash permits assignments without a value (for example ``IFS=``).
|
||||
# tree-sitter represents those assignments without a value node.
|
||||
if value is None:
|
||||
return PkgbuildPatch(key, "")
|
||||
|
||||
match value.type:
|
||||
case PkgbuildNodeType.Array:
|
||||
array_values = []
|
||||
|
||||
Reference in new issue
Block a user