diff --git a/lib_environment_checker.py b/lib_environment_checker.py index 85f7dc3..2e6cf06 100644 --- a/lib_environment_checker.py +++ b/lib_environment_checker.py @@ -129,8 +129,8 @@ def check_git_status(project_path: Path, project_email_addresses: list[list[str, ## check for uncommitted changes -------------------------- call_result: tuple[bool, dict] = lib_git_handler.run_git_status(project_path) (ok, output) = call_result - if 'nothing to commit, working tree clean' not in output['stdout']: - message = 'Error: Uncommitted changes found.' + if 'working tree clean' not in output['stdout']: + message = 'Error: git-status check failed.' log.exception(message) ## email project sys-admins --------------------------------- emailer = Emailer(project_path) diff --git a/tests.py b/tests.py index 74660a1..9cc9b84 100644 --- a/tests.py +++ b/tests.py @@ -67,7 +67,7 @@ def test_git_status_clean(self): def test_git_status_not_clean(self): """ - Checks that `Changes not staged for commit` is detected properly. + Checks that various non-"clean" states are detected properly. Assumes current-project is on branch `main`. """ target_dir = Path('../git_tests/check_changes_not_staged/').resolve()