aedi: fix applying of patches

This commit is contained in:
alexey.lysiuk 2022-08-30 16:11:38 +03:00
parent 7df124384b
commit 7a76fb577b

View file

@ -193,7 +193,7 @@ class BuildState:
test_arg = '--dry-run'
args = ['patch', test_arg, '--strip=1', '--input=' + str(patch_path)]
if subprocess.run(args, cwd=extract_path, env=self.environment) == 0:
if subprocess.run(args, cwd=extract_path, env=self.environment).returncode == 0:
# Patch wasn't applied yet, do it now
args.remove(test_arg)
subprocess.run(args, check=True, cwd=extract_path, env=self.environment)