Skip to content

Commit ca38881

Browse files
Copilotfelickz
andcommitted
Make link checker script portable and environment-agnostic
Co-authored-by: felickz <1760475+felickz@users.noreply.github.com>
1 parent a5eb506 commit ca38881

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

check_links.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,9 @@ def check_links_parallel(self, links: List[Tuple[str, str, int]]) -> List[Dict]:
195195
def main():
196196
# Find all markdown files
197197
md_files = []
198-
repo_root = '/home/runner/work/awesome-codeql/awesome-codeql'
198+
# Use the directory where the script is located as the repository root
199+
# This makes the script work from any location
200+
repo_root = os.path.dirname(os.path.abspath(__file__)) if os.path.dirname(os.path.abspath(__file__)) else os.getcwd()
199201

200202
for root, dirs, files in os.walk(repo_root):
201203
# Skip .git directory

0 commit comments

Comments
 (0)