Skip to content

Commit

Permalink
including host name in the exception
Browse files Browse the repository at this point in the history
  • Loading branch information
cpelley committed Sep 5, 2024
1 parent 1f107a3 commit 054c1f0
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions dagrunner/plugin_framework.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,13 +199,11 @@ def __call__(
pattern = args[indx]
host = None
if ":" in pattern:
host, pattern = pattern.split(":")

if host:
host, noh_pattern = pattern.split(":")
# bash equivalent to python glob (glob on remote host)
expanded_paths = subprocess.run(
f'ssh {host} \'for file in {pattern}; do if [ -e "$file" ]; then '
'echo "$file"; fi; done\'',
f'ssh {host} \'for file in {noh_pattern}; do if [ -e "$file" ]; '
'then echo "$file"; fi; done\'',
shell=True,
check=True,
text=True,
Expand Down

0 comments on commit 054c1f0

Please sign in to comment.