diff --git a/build/jenkins/pipelines/checkrefs.Jenkinsfile b/build/jenkins/pipelines/checkrefs.Jenkinsfile index 41072e8b08..5e9f7262b2 100644 --- a/build/jenkins/pipelines/checkrefs.Jenkinsfile +++ b/build/jenkins/pipelines/checkrefs.Jenkinsfile @@ -38,7 +38,7 @@ pipeline { stage("Data checks") { steps { - sh "cd source/tools/entity/ && python3 checkrefs.py -tax" + sh "python3 source/tools/entity/checkrefs.py -tax" } } } diff --git a/source/tools/entity/checkrefs.py b/source/tools/entity/checkrefs.py index 37ac8000c2..45d42fdd22 100755 --- a/source/tools/entity/checkrefs.py +++ b/source/tools/entity/checkrefs.py @@ -131,14 +131,14 @@ class CheckRefs: if args.check_unused: self.check_unused() if args.validate_templates: - sys.path.append("../xmlvalidator/") + sys.path.append(str(Path(__file__).parent.parent / "xmlvalidator")) from validate_grammar import RelaxNGValidator validate = RelaxNGValidator(self.vfs_root, self.mods) if not validate.run(): self.inError = True if args.validate_actors: - sys.path.append("../xmlvalidator/") + sys.path.append(str(Path(__file__).parent.parent / "xmlvalidator")) from validator import Validator validator = Validator(self.vfs_root, self.mods)