mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 22:33:25 +00:00
Makes subversion module --check fail when modified files are in repository.
This commit is contained in:
@@ -285,6 +285,8 @@ def main():
|
|||||||
# positives. Need to switch before revert to ensure we are reverting to
|
# positives. Need to switch before revert to ensure we are reverting to
|
||||||
# correct repo.
|
# correct repo.
|
||||||
if module.check_mode or not update:
|
if module.check_mode or not update:
|
||||||
|
if svn.has_local_mods() and not force:
|
||||||
|
module.fail_json(msg="ERROR: modified files exist in the repository.")
|
||||||
check, before, after = svn.needs_update()
|
check, before, after = svn.needs_update()
|
||||||
module.exit_json(changed=check, before=before, after=after)
|
module.exit_json(changed=check, before=before, after=after)
|
||||||
before = svn.get_revision()
|
before = svn.get_revision()
|
||||||
|
|||||||
Reference in New Issue
Block a user