Skip to content

Commit

Permalink
Merge pull request #587 from jcohen02/fix/issue586
Browse files Browse the repository at this point in the history
Fix for issue #586, removing HOME env var from shell wrapper script file path
  • Loading branch information
andre-merzky authored Sep 30, 2016
2 parents e68f370 + 79f0f03 commit 7e0ab59
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/saga/adaptors/shell/shell_job.py
Original file line number Diff line number Diff line change
Expand Up @@ -575,6 +575,13 @@ def initialize (self) :
# src = shell_wrapper._WRAPPER_SCRIPT % ({ 'PURGE_ON_START' : str(self._adaptor.purge_on_start) })
src = shell_wrapper._WRAPPER_SCRIPT
src = src.replace('%(PURGE_ON_START)s', str(self._adaptor.purge_on_start))

# If the target directory begins with $HOME or ${HOME} then we
# need to remove this since scp won't expand the variable and
# the copy will end up attempting to copy the file to
# /<path_to_home_dir>/$HOME/.....
if tgt.startswith("$HOME") or tgt.startswith("${HOME}"):
tgt = tgt[tgt.find('/')+1:]
self.shell.write_to_remote (src, tgt)

# ----------------------------------------------------------------------
Expand Down

0 comments on commit 7e0ab59

Please sign in to comment.