Skip to content

Commit 33a1126

Browse files
committed
doc: update CLI documentation for environment variable permission checks
1 parent ed6fa9e commit 33a1126

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

doc/api/cli.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,8 +224,8 @@ $ node --permission --allow-env=* --allow-fs-read=* -p 'process.env.HOME'
224224
Environment variable permissions can be checked programmatically:
225225

226226
```js
227-
process.permission.has('env'); // true if any env access is allowed
228-
process.permission.has('env', 'HOME'); // true if HOME is allowed
227+
process.permission.has('env'); // True if any env access is allowed
228+
process.permission.has('env', 'HOME'); // True if HOME is allowed
229229
```
230230

231231
Attempting to write a restricted variable throws:
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
CUSTOM_VARIABLE=hello-world
22
NODE_NO_WARNINGS=1
3-
NODE_OPTIONS="--permission --allow-fs-read=*"
3+
NODE_OPTIONS="--permission --allow-fs-read=* --allow-env=*"
44
TZ=Pacific/Honolulu
55
UV_THREADPOOL_SIZE=5
66
BASIC=overridden

0 commit comments

Comments
 (0)