From d986886ed94365dccfedb850520a0a60abeda9b3 Mon Sep 17 00:00:00 2001 From: Daniel van der Ploeg Date: Wed, 10 Sep 2025 14:19:13 +0930 Subject: [PATCH] fix: use command flag rather than stdout --- pipe/pipe.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/pipe/pipe.py b/pipe/pipe.py index 05f0513..5109f87 100644 --- a/pipe/pipe.py +++ b/pipe/pipe.py @@ -137,6 +137,7 @@ def filter_paths(path): "-d", "memory_limit=512M", "--report=junit", + "--report-file=test-results/phpcs.xml" f"--standard={self.standards}" ] + changed_files @@ -144,12 +145,6 @@ def filter_paths(path): stderr=subprocess.PIPE, universal_newlines=True) self.standards_failure = False if phpcs.returncode == 0 else True - phpcs_output = phpcs.stdout.strip() - - if phpcs_output: - with open("test-results/phpcs.xml", 'a') as output_file: - output_file.write(phpcs_output) - def composer_install(self): composer_install_command = ["composer", "install", "--dev"] composer_install = subprocess.run(composer_install_command)