From 7a76fb577bce824553579377ba63349a7ac4ce72 Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Tue, 30 Aug 2022 16:11:38 +0300 Subject: [PATCH] aedi: fix applying of patches --- aedi/state.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aedi/state.py b/aedi/state.py index e9d9e123..5fcf63b3 100644 --- a/aedi/state.py +++ b/aedi/state.py @@ -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)