GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — doc: fix permission documentation examples · nodejs/node@1bf7737

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • doc/api
    • permissions.md
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎doc/api/permissions.md‎

Copy file name to clipboardExpand all lines: doc/api/permissions.md
+2-2Lines changed: 2 additions & 2 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ const config = fs.readFileSync('/etc/myapp/config.json', 'utf8');
133133
// Drop read access to /etc/myapp after initialization
134134
process.permission.drop('fs.read', '/etc/myapp');
135135

136-
// This will now throw ERR_ACCESS_DENIED
136+
// This will now return false
137137
process.permission.has('fs.read', '/etc/myapp/config.json'); // false
138138

139139
// Drop child process permission entirely
@@ -211,7 +211,7 @@ $ node --permission index.js
211211
* `index.js` will be included in the allowed file system read list
212212

213213
```console
214-
$ node -r /path/to/custom-require.js --permission index.js.
214+
$ node -r /path/to/custom-require.js --permission index.js
215215
```
216216

217217
* `/path/to/custom-require.js` will be included in the allowed file system read

0 commit comments

Comments
0 (0)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.