Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix CI #730

Merged
merged 15 commits into from
Jun 24, 2023
Prev Previous commit
Next Next commit
aldksjf
  • Loading branch information
sezanzeb committed Jun 24, 2023
commit 05d76bcff9267326d413ca8ac88a9b2158083ee8
4 changes: 1 addition & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ jobs:
run: |
# FIXME: Had some permissions issues, currently worked around by running tests as root
mkdir test_tmp
export DATA_DIR="/home/runner/work/input-remapper/data"
export DATA_DIR="/home/runner/work/input-remapper/input-remapper/data/"
export TMPDIR="$(realpath test_tmp)"
find / -type f -name "input-remapper.glade"
find $DATA_DIR
sudo python tests/test.py --start-dir unit
7 changes: 6 additions & 1 deletion inputremapper/configs/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,13 @@ def _try_env_data_dir():
"""Check if input-remappers data can be found at DATA_DIR."""
data_dir = os.environ.get("DATA_DIR", None)

if data_dir and os.path.exists(data_dir):
if data_dir is None:
return None

if os.path.exists(data_dir):
return data_dir
else:
logger.error(f'"{ data_dir }" does not exist')

return None

Expand Down