-
-
Notifications
You must be signed in to change notification settings - Fork 47
Closed
Description
When I import the ignore package in Deno, it always requests access to the IGNORE_TEST_WIN32 environment variable, which seems unnecessary and could be confusing for end users.
$ deno repl
Deno 2.3.3
exit using ctrl+d, ctrl+c, or close()
> import "npm:ignore"
┏ ⚠️ Deno requests env access to "IGNORE_TEST_WIN32".
┠─ To see a stack trace for this prompt, set the DENO_TRACE_PERMISSIONS environmental variable.
┠─ Learn more at: https://docs.deno.com/go/--allow-env
┠─ Run again with --allow-env to bypass this prompt.
┗ Allow? [y/n/A] (y = yes, allow; n = no, deny; A = allow all env permissions) >
I'm not sure if using an environment variable is appropriate for this kind of option in the first place. But if it's needed for certain situations or backward compatibility, would it be possible to skip accessing it in Deno, like this?
if (
// Detect `process` so that it can run in browsers.
typeof process !== 'undefined'
&& (
(typeof Deno === 'undefined' && process.env && process.env.IGNORE_TEST_WIN32)
|| process.platform === 'win32'
)
) {Metadata
Metadata
Assignees
Labels
No labels