Skip to content

Shell expansion using subscript not working on Windows #605

@Qrysto

Description

@Qrysto

Problem: In the Shell Expansion page of the documentation, 2 solutions are listed, one of which is using subscript as follows:

{
  "scripts": {
    "_echo": "echo Hello $HELLO",
    "hello": "dotenvx run -- npm run _echo"
  }
}

However this solution doesn't work on Windows 11 as the syntax for Windows is %HELLO% rather than $HELLO. Running npm run hello on Windows only output:

Hello $HELLO

which is not what we want.

Expected behavior: Given that cross platform is one of dotenvx's selling points, is it possible to make the above example work on Windows?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions