From c99eb17850e51327449e6fac5572c6cfc436d21c Mon Sep 17 00:00:00 2001 From: Paul Bonaud Date: Tue, 24 Mar 2020 10:18:14 +0100 Subject: vars: fix `clever_base_env` by removing a variable if not necessary The `CC_RUN_COMMAND` variable was defined in case we use haskell binary as entrypoints. However if the `clever_haskell_entry_point` variable is not defined we shouldn't define the `CC_RUN_COMMAND` env variable. --- templates/env.j2 | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'templates') diff --git a/templates/env.j2 b/templates/env.j2 index d2bf446..66e5508 100644 --- a/templates/env.j2 +++ b/templates/env.j2 @@ -1,3 +1,9 @@ {% for key, value in (clever_base_env | combine(clever_env)).items() %} -{{ key }}="{{ value | tojson }}" +{{ key }}="{{ value | to_json }}" {% endfor %} + +{%- if clever_haskell_entry_point %} +{# Haskell only #} +{# https://www.clever-cloud.com/doc/get-help/reference-environment-variables/#haskell #} +CC_RUN_COMMAND="{{'~/.local/bin/' + clever_haskell_entry_point | to_json }}" +{% endif %} -- cgit v1.2.3