As currently written (in v17.5.1), the deno platform shim will unavoidably prompt the user for 'env' and 'read' permissions if not already granted when the module is imported.

No matter which answers are given, the module is imported without error.
But this is a forced UI/UX interaction that the most user scripts would want to avoid, instead giving user feedback in accordance to the script's own UI/UX plan. This could be especially problematic for CI where there is no user at the keyboard to answer.
A small change to the use of permission queries instead of using try/catch can fix this behavior while keeping the fallback values in place for the cwd and env variables (see PR #2217).