Skip to content

{{ in App Environment Variable values break the cf env command #2821

Description

@cweibel

Please fill out the issue checklist below and provide ALL the requested information.

  • I reviewed open and closed github issues that may be related to my problem.
  • I tried updating to the latest version of the CF CLI to see if it fixed my problem.
  • I attempted to run the command with CF_TRACE=1 to help debug the issue.
  • I am reporting a bug that others will be able to reproduce.

Describe the bug and the command you saw an issue with
I am attempting to run cf env to pull back the environment variables for an app with environment variables.

What happened
A clear and concise description of what happen.
The CLI returns back:

...
User-Provided:
TEST2: blah[]

		Something unexpected happened. This is a bug in cf.

		Please re-run the command that caused this exception with the environment
		variable CF_TRACE set to true.

		Also, please update to the latest cli and try the command again:
		https://code.cloudfoundry.org/cli/releases

		Please create an issue at: https://code.cloudfoundry.org/cli/issues

		Include the below information when creating the issue:

		Command
		cf env icu2

		CLI Version
		7.7.9+984062b.2024-03-07

		Error
		template: Display Text:1: function "blah5" not defined

Expected behavior
What should have been returned was:

User-Provided:
TEST2: blah[]
TEST3: blah{{blah5
TEST4: blah

Exact Steps To Reproduce
Steps to reproduce the behavior; include the exact CLI commands and verbose output:

Create an app manifest for any app that contains these three environment variables:

applications:
- name: icu2
  memory: 256M
  stack: cflinuxfs4
  buildpacks:
  - https://github.com/cloudfoundry/apt-buildpack/
  - https://github.com/cloudfoundry/ruby-buildpack/
  env:
    TEST2: blah[]
    TEST3: blah{{blah5
    TEST4: blah

cf push icu2
cf env icu2

Provide more context

  • MacOS, iTerm2 3.4.19
  • CF CLI 7.7.9+984062b.2024-03-07
  • CF API 3.160.0

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions