Skip to content

Commit

Permalink
check_gamefixes: log relative paths to gamefix modules
Browse files Browse the repository at this point in the history
  • Loading branch information
R1kaB3rN committed Sep 4, 2024
1 parent ff22f48 commit 5e5e48f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/scripts/check_gamefixes.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,14 +171,16 @@ def check_links(root: Path) -> None:
if not file.name.startswith(('__init__.py', 'default.py', 'winetricks-gui.py'))
]

print('Checking for broken symbolic links...', file=sys.stderr)
for module in gamefixes:
print(f'{module.parent.name}/{module.name}', file=sys.stderr)
if module.is_symlink() and not module.exists():
err = f'The following file is not a valid symbolic link: {module}'
raise FileNotFoundError(err)


def check_filenames(root: Path) -> None:
"""Check for expected filenames.
"""Check for expected file names.
All files in non-steam gamefixes are expected to start with 'umu-'
"""
Expand All @@ -189,7 +191,9 @@ def check_filenames(root: Path) -> None:
and not file.parent.name.startswith('gamefixes-steam')
]

print('Checking for expected file names...', file=sys.stderr)
for module in gamefixes:
print(f'{module.parent.name}/{module.name}', file=sys.stderr)
if module.exists() and not module.name.startswith('umu-'):
err = f'The following file does not start with "umu-": {module}'
raise FileNotFoundError(err)
Expand Down

0 comments on commit 5e5e48f

Please sign in to comment.