Skip to content

Commit

Permalink
Inversing the logic so that we log if the source doesn't exist
Browse files Browse the repository at this point in the history
  • Loading branch information
demonpig committed Jan 13, 2025
1 parent 05df03e commit 2fc697a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ansible_runner/config/_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -402,8 +402,8 @@ def _update_volume_mount_paths(self,

# ensure source is abs
src_path = os.path.abspath(os.path.expanduser(os.path.expandvars(src_mount_path)))
if os.path.exists(src_path):
debug(f"Source volume mount path does not exist: {src_mount_path}")
if not os.path.exists(src_path):
debug(f"Source volume mount path does not exist: {src_path}")
if os.path.isfile(src_path):
debug(f"Source volume mount path '{src_path}' is a file, will resolve to parent directory: {os.path.dirname(src_path)}")
src_path = os.path.dirname(src_path)
Expand Down

0 comments on commit 2fc697a

Please sign in to comment.