Closed azohra closed 10 months ago
I have created an initial fix to get things working as expected. Suggestions are certainly in the nice to have category ❤️
Thanks for all the amazing work on this starter kit! Long live Deno! Long live Fresh!
Closed by #649. Thanks for helping!
Expected behavior
init_stripe
script runs using the key defined in.env
and successfully returns theSTRIPE_PREMIUM_PLAN_PRICE_ID
to stdout, as defined in the README.mdIssue Reproduction steps Run:
deno task init:stripe
With:
and
The user will be presented with the following error
Workaround steps If you manually pollute the env with
export STRIPE_SECRET_KEY=some_key
and re-run the taskdeno task init:stripe
you will be presented with the expected outputSuggestions I believe there is an opportunity to show off the robustness of
.env
in Deno when fixing this.In particular
.env
files such as.env.local
and.env.production
which can be loaded with Stripe test vs real keys..env.example
whereSTRIPE_SECRET_KEY
andSTRIPE_PREMIUM_PLAN_PRICE_ID
can be defined but loaded withallowEmptyValues: true,
.null
/empty
/Falsey
values would indicate a desire to not use the Stripe feature.--env
in tasks such that we are always loading a.env