Skip to content

Commit 2cff081

Browse files
committed
Minor fixes to CI script.
I had problems with proper resolution of codeql_repo_dir with old python installation, this fixes it
1 parent 7d92ec5 commit 2cff081

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

misc/scripts/accept-expected-changes-from-ci.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,13 @@
3838

3939

4040
def _get_codeql_repo_dir() -> Path:
41-
return Path(__file__).parent.parent.parent
41+
return Path(__file__).parent.parent.parent.resolve()
4242

4343

4444
CODEQL_REPO_DIR = _get_codeql_repo_dir()
4545

46-
4746
def _get_semmle_code_dir() -> Optional[Path]:
48-
guess = CODEQL_REPO_DIR.parent
47+
guess = CODEQL_REPO_DIR.parent.resolve()
4948
try:
5049
out = subprocess.check_output(
5150
["git", "remote", "-v"],
@@ -413,7 +412,7 @@ def ok_job_name(job_name: str) -> bool:
413412

414413
subprocess.check_call(["git", "apply", temp.name], cwd=patch.dir)
415414

416-
if "CONSISTENCY" in patch.filename.parts:
415+
if "CONSISTENCY" in patch.filename.parts and patch.filename.exists():
417416
# delete if empty
418417
if os.path.getsize(patch.filename) == 1 and patch.filename.read_text() == "\n":
419418
os.remove(patch.filename)

0 commit comments

Comments
 (0)