Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistent variable expansion in arguments Win VS Linux #343

Open
b12k opened this issue Feb 5, 2022 · 0 comments
Open

Inconsistent variable expansion in arguments Win VS Linux #343

b12k opened this issue Feb 5, 2022 · 0 comments

Comments

@b12k
Copy link

b12k commented Feb 5, 2022

Hello, thank you for a great lib 🤘

I'm facing a problem related to environment variables expansion on Windows and Linux (Github Actions)

I use env-cmd in package.json scripts.

.env

VAR=Hello World

package.json

{
  "name": "env-cmd-bug",
  "version": "1.0.0",
  "main": "index.js",
  "license": "MIT",
  "scripts": {
    "unescaped": "env-cmd -x --verbose echo $VAR",
    "escaped": "env-cmd -x --verbose echo \\$VAR"
  },
  "dependencies": {
    "env-cmd": "^10.1.0"
  }
}

Escaping the $ sign works for Linux, but fails on Windows.

Outputs:

Ubuntu
изображение

Windows
изображение

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant