We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 787a7c9 commit 4a1036cCopy full SHA for 4a1036c
worker/src/Main.hs
@@ -81,16 +81,16 @@ serveDepsInfo json =
81
82
getSecret :: IO String
83
getSecret =
84
- do args <- Env.getArgs
85
- case args of
86
- [secret] ->
+ do maybeValue <- Env.lookupEnv "STRIPE_SECRET"
+ case maybeValue of
+ Just secret ->
87
return secret
88
89
- _ ->
+ Nothing ->
90
do IO.hPutStrLn IO.stderr
91
- "Expecting a secret for /donate page:\n\
+ "Expecting environment variable STRIPE_SECRET to be defined:\n\
92
\\n\
93
- \ ./run-worker sk_test_abcdefghijklmnopqrstuvwxyz\n\
+ \ STRIPE_SECRET=sk_test_abcdefghijklmnopqrstuvwxyz\n\
94
95
- \Needed for handling donations with Stripe."
+ \It is needed for handling donations with Stripe."
96
Exit.exitFailure
0 commit comments