There was an error while loading. Please reload this page.
1 parent 5a852b2 commit 9633bb0Copy full SHA for 9633bb0
1 file changed
doc/api/permissions.md
@@ -138,7 +138,7 @@ const config = fs.readFileSync('/etc/myapp/config.json', 'utf8');
138
// Drop read access to /etc/myapp after initialization
139
process.permission.drop('fs.read', '/etc/myapp');
140
141
-// This will now throw ERR_ACCESS_DENIED
+// This will now return false
142
process.permission.has('fs.read', '/etc/myapp/config.json'); // false
143
144
// Drop child process permission entirely
@@ -219,7 +219,7 @@ $ node --permission index.js
219
* `index.js` will be included in the allowed file system read list
220
221
```console
222
-$ node -r /path/to/custom-require.js --permission index.js.
+$ node -r /path/to/custom-require.js --permission index.js
223
```
224
225
* `/path/to/custom-require.js` will be included in the allowed file system read
0 commit comments