diff options
author | Thibault Saunier <tsaunier@gnome.org> | 2016-08-10 09:39:23 -0400 |
---|---|---|
committer | Thibault Saunier <tsaunier@gnome.org> | 2016-08-10 12:15:06 -0400 |
commit | fef7843866fcccfffa0f09e04b27bcf53a7373fe (patch) | |
tree | f081e1ea5432cb79218ea9def2887a908775e76f | |
parent | 0c13cb14b3f6270199725a28ab3a6af3754a4106 (diff) |
Do not print `pre-commit` output and let user interact with arclint
Differential Revision: https://phabricator.freedesktop.org/D1270
-rwxr-xr-x | git-phab | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -748,9 +748,9 @@ Paste API Token from that page and press <enter>: """ % self.phabricator_uri) def run_linter(self): if not os.path.exists(".pre-commit-config.yaml"): if os.path.exists(".arclint"): - return subprocess.check_output( - "arc lint --never-apply-patches", - shell=True).decode("utf-8") + subprocess.check_call("arc lint --never-apply-patches", + shell=True).decode("utf-8") + return None else: return None command = ["pre-commit", "run", "--files"] @@ -971,12 +971,12 @@ Paste API Token from that page and press <enter>: """ % self.phabricator_uri) print(" * Running linters...", end="") linter_status = "none" try: - print(self.run_linter()) + self.run_linter() print("%s OK%s" % (Colors.OKGREEN, Colors.ENDC)) linter_status = "okay" except BaseException as e: linter_status = "fail" - if isinstance(e, subprocess.CalledProcessError): + if isinstance(e, subprocess.CalledProcessError) and e.stdout: linter_result = e.stdout.decode("utf-8") else: linter_result = str(e) |