Skip to content

On windows, backslashes should not be escaped for verbatim environment variables

Current situation

Backslashes (\) are escaped in Windows verbatim environment variables. That is, if a workflow contains something like:

variables:
  FOO:
    value: C:\Windows
    verbatim: true

The FOO environment variable will be defined as: @set "FOO=C:^\Windows". This means that if the environment variable is used in commands such as cd "%FOO%", it will not work as expected.

Desired outcome

On Windows, verbatim environment variables should not escape the backslashes.