DenoDDeno
Powered by
rauniorooR
Denoβ€’3y agoβ€’
8 replies
raunioroo

Deny env permissions silently (without throwing)

Hi. An
npm
npm
module I'm using tries to read, or rather check for an existence of an
env
env
variable. The problem is it throws due to not having permission to access
env
env
.

I'd rather not give any
env
env
permissions to any of my scripts.

I think the offending npm module can do with having env variables undefined, it's just that it throws just trying to see if the variables are there. Can I somehow make Deno silently return empty/null without throwing an error?

(if it's any importance, the offending module is
npm:deepl-node
npm:deepl-node
, which uses
npm:axios
npm:axios
, which tries to see if there is something in
NODE_EXTRA_CA_CERTS
NODE_EXTRA_CA_CERTS
and is then unable to handle the access denied exception)
Deno banner
DenoJoin
Chat about Deno, a modern runtime for JavaScript and TypeScript.
20,934Members
Resources
Recent Announcements

Similar Threads

Was this page helpful?

Similar Threads

Drop permissions
it's em!Iit's em! / help
2y ago
Permissions dump
Bogdan BivBBogdan Biv / help
4y ago