rover icon indicating copy to clipboard operation
rover copied to clipboard

Unable to provide router config values that contain dollar signs

Open UpcraftLP opened this issue 3 months ago • 2 comments

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

UpcraftLP avatar Oct 01 '25 13:10 UpcraftLP

"some$$$$api$$$$key" four dollar signs works!

lennyburdette avatar Oct 01 '25 13:10 lennyburdette

Thank you, that did work.

Not very intuitive however, and I could not find it mentioned in the documentation either.

UpcraftLP avatar Oct 01 '25 14:10 UpcraftLP