Skip to content

Unable to provide router config values that contain dollar signs #2737

@UpcraftLP

Description

@UpcraftLP

Description

I have a variable value that contains a dollar sign $. Currently it seems like there is no way to get the parser to NOT try and expand that.
I tried with both $$ and \$ but neither seemed to work.

Steps to reproduce

set up a connector with the following router config snippet:

connectors:
  sources:
    abc.def:
      $config:
        api.token: "some$api$key" # this is expected to fail

        # -- alternative 1:
        api.token: "some\\$api\\$key"

        # -- alternative 2:
        api.token: "some$$api$$key"

..and run rover dev while passing the above router config.

Expected result

api.token should fail to parse, but one of the alternatives provided above should be accepted and have the value some$api$key when used for the connector request.

Output

All 3 cases produce the same error message:

ERROR: Failed to read configuration: could not expand variable: api. Variables must be prefixed with one of 'env|file' followed by '.' e.g. 'env.'

Environment

Rover Info:
Version: 0.36.0
Install Location: %HOMEPATH%\.rover\bin\rover.exe
OS: Windows 10.0.26100 (Windows 11 Enterprise) [64-bit]
Shell: Powershell 7.5.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug 🐞triageissues and PRs that need to be triaged

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions