When env vars have different value depending on case, throw error

Open
#543 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
48/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
kotlin
Domain
tooling

Research direction

Start in jvm/selfie-runner-junit5/src/main/kotlin/com/diffplug/selfie/junit5/SelfieSettingsAPI.kt at lines 31-38 and inspect how environment variables are selected. Reproduce the case where lowercase and uppercase variables disagree, then add coverage for the expected error and run the relevant JVM tests. Done means conflicting values produce an easy-to-understand error rather than one silently taking precedence.

Written by the indexing model from the issue text.

Description

bug jvm py

This has the confusing behavior that variables with a lowercase key trump an uppercase key

https://github.com/diffplug/selfie/blob/e6fb9e6a33b650c72aab3d5459ae1c22ab865cda/jvm/selfie-runner-junit5/src/main/kotlin/com/diffplug/selfie/junit5/SelfieSettingsAPI.kt#L31-L38

I think it's good to be case-insensitive, but if both variables exist and disagree it should generate an easy-to-understand error.

Dominant language
Kotlin
Stars
101
Forks
18
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from diffplug/selfie

All issues in diffplug/selfie

Similar issues

More Kotlin issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.