try fixing gitea ci: v22
This commit is contained in:
@@ -6,6 +6,7 @@ import json
|
||||
import os
|
||||
import re
|
||||
import subprocess
|
||||
import subprocess_tee
|
||||
import sys
|
||||
import urllib.request
|
||||
from collections import Counter
|
||||
@@ -17,7 +18,7 @@ def run(*args, **kw):
|
||||
|
||||
|
||||
def nix(*args):
|
||||
return run("nix", "--extra-experimental-features", "nix-command flakes", "-L", *args, check=True, stdout=subprocess.PIPE).stdout
|
||||
return subprocess_tee.run(("nix", "--extra-experimental-features", "nix-command flakes", "-L", *args), check=True, text=True).stdout
|
||||
|
||||
|
||||
def git(*args, check=True):
|
||||
@@ -362,7 +363,7 @@ def lint_report(args):
|
||||
|
||||
codes = [reviewdog(f"{args.dir}/{name}", flags)
|
||||
for name, flags in LINTERS
|
||||
if os.path.getsize(f"{args.dir}/{name}") > 0]
|
||||
if os.path.isfile(f"{args.dir}/{name}") and os.path.getsize(f"{args.dir}/{name}") > 0]
|
||||
sys.exit(1 if any(codes) else 0)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user