Skip to content

Commit

Permalink
clean up a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
reschandreas committed Jan 2, 2024
1 parent f5e34b2 commit fc18ebe
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions cli/templates/cli.sh.j2
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,11 @@ final_aeolus_post_action () {
}
{% endif %}
main () {
{%- if needs_subshells %}
if [[ "${1}" == "aeolus_sourcing" ]]; then
return 0 # just source to use the methods in the subshell, no execution
fi
{%- endif -%}
{%- if needs_lifecycle_parameter -%}
local _current_lifecycle="${1}"
{% endif %}
Expand All @@ -106,16 +108,15 @@ main () {
{%- else %}
cd {{ initial_directory }}
{{ function }} "${_current_lifecycle}"
{%- endif -%}
{%- else -%}
{%- if needs_subshells %}
{%- endif -%}
{%- else -%}
{%- if needs_subshells %}
cd {{ initial_directory }}
bash -c "source ${_script_name} aeolus_sourcing; {{ function }}"
{%- else %}
cd {{ initial_directory }}
{%- else %}
{{ function }}
{%- endif -%}
{%- endif -%}
{%- endif -%}
{%- endif -%}
{% endfor %}
}

Expand Down

0 comments on commit fc18ebe

Please sign in to comment.