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

fix: boolean env vars #2532

Merged
merged 3 commits into from
Sep 25, 2023
Merged

fix: boolean env vars #2532

merged 3 commits into from
Sep 25, 2023

Conversation

iamacook
Copy link
Member

What it solves

Resolves wrong env var values

How this PR fixes it

IS_PRODUCTION and IS_OFFICIAL_HOST not check whether their respective env var is not boolean but 'true' as env vars are strings.

How to test it

IS_PRODUCTION

The debug switches should display in the sidebar if process.env.NEXT_PUBLIC_IS_PRODUCTION is false, when true, not.

IS_OFFICIAL_HOST

The /imprint page should return nothing if process.env.NEXT_PUBLIC_IS_OFFICIAL_HOST is false, when true, the imprint.

Checklist

  • I've tested the branch on mobile 📱
  • I've documented how it affects the analytics (if at all) 📊
  • I've written a unit/e2e test for it (if applicable) 🧑‍💻

@iamacook iamacook self-assigned this Sep 20, 2023
@github-actions
Copy link

github-actions bot commented Sep 20, 2023

Branch preview

✅ Deploy successful!

https://boolean_env_vars--walletweb.review-wallet-web.5afe.dev

@github-actions
Copy link

github-actions bot commented Sep 20, 2023

ESLint Summary View Full Report

Annotations are provided inline on the Files Changed tab. You can also see all annotations that were generated on the annotations page.

Type Occurrences Fixable
Errors 0 0
Warnings 0 0
Ignored 0 N/A
  • Result: ✅ success
  • Annotations: 0 total

Report generated by eslint-plus-action

@francovenica
Copy link
Contributor

Aaron walked through this one since is only testeable in local environments.
We played with the env variables and see the correspondand results:

If the env is set as true for prod, the debug switches don't show
If the env is set as true for official host, the imprint page is visible.

Looks good to me

@iamacook iamacook merged commit 89bcb82 into dev Sep 25, 2023
9 checks passed
@iamacook iamacook deleted the boolean-env-vars branch September 25, 2023 08:31
@github-actions github-actions bot locked and limited conversation to collaborators Sep 25, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants