Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for issue #586, removing HOME env var from shell wrapper script file path #587

Merged
merged 1 commit into from
Sep 30, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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