alan-turing-institute / science-gateway-middleware

Middleware endpoints for the Science Gateway project
https://github.com/alan-turing-institute/science-gateway
MIT License
3 stars 0 forks source link

Shell variables may cause mako issues #56

Open masonlr opened 6 years ago

masonlr commented 6 years ago

Will check up on this later, but constructs such as

#!/bin/sh
cd ${0%/*} || exit 1    # Run from this directory

# Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions

may cause issues with mako templating.

mako.exceptions.SyntaxException: (SyntaxError) invalid syntax (<unknown>, line 1) ('0%/*') in file 
masonlr commented 6 years ago

For the moment, pass this script to the simulator as a script rather than a template. (This works as script files bypass mako)