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

Linter rejects .env.example file #985

Open
arianvp opened this issue Dec 23, 2024 · 4 comments · May be fixed by #990
Open

Linter rejects .env.example file #985

arianvp opened this issue Dec 23, 2024 · 4 comments · May be fixed by #990
Assignees

Comments

@arianvp
Copy link

arianvp commented Dec 23, 2024

The super-linter says my .env.example file is invalid when it contains an environment variable with dashes:

INPUT_MY-EXAMPLE=3

however the dashes are required for local-action to work.

This is a bug

@ncalteen
Copy link
Collaborator

ncalteen commented Jan 2, 2025

Can you link to an example where this occurs?

@ncalteen ncalteen self-assigned this Jan 2, 2025
@arianvp
Copy link
Author

arianvp commented Jan 2, 2025

Now without the typo; but still doesn't pass lint:

https://github.com/arianvp/reproduce-985-action/blob/main/.env.example#L11

@ncalteen
Copy link
Collaborator

ncalteen commented Jan 2, 2025

Looks like in either case the delimiter is being flagged by dotenv-linter:

  • INPUT-MY-INPUT
  • INPUT_MY-INPUT

The expected behavior in the GitHub Actions runtime is to set environment variables by prefixing INPUT_ and converting to uppercase. However, any other dashes are left as-is, so the second one matches what GitHub Actions (and local-action) would expect.

Created #990 to disable this error when the linter runs on .env.example

@ncalteen ncalteen linked a pull request Jan 2, 2025 that will close this issue
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.

2 participants