Skip to content

Commit

Permalink
-l flag only applied if shell path is /bin/sh
Browse files Browse the repository at this point in the history
  • Loading branch information
Darrin Fong committed Aug 12, 2020
1 parent 4d4bb27 commit 1cb9c66
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tools/python/boutiques/localExec.py
Expand Up @@ -261,7 +261,10 @@ def execute(self, mount_strings):
(conPath, container_location) = self.prepare(conTypeToUse)
# Generate command script
# Get the supported shell by the docker or singularity
cmdString = "#!"+self.shell+" -l"+os.linesep+str(command)
cmdString = "#!{}".format(self.shell)
if self.shell == "/bin/sh":
cmdString += " -l"
cmdString += os.linesep + str(command)
with open(dsname, "w") as scrFile:
scrFile.write(cmdString)
# Ensure the script is executable
Expand Down

0 comments on commit 1cb9c66

Please sign in to comment.