From 048c722f07fd3337bc7d8c1bc46fc1869d094f70 Mon Sep 17 00:00:00 2001 From: greenhead Date: Sat, 1 Aug 2026 14:12:55 +0900 Subject: [PATCH] doc: fix permission documentation examples Signed-off-by: greenhead --- doc/api/permissions.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/api/permissions.md b/doc/api/permissions.md index 05a18db0457d..465dc8ab9c09 100644 --- a/doc/api/permissions.md +++ b/doc/api/permissions.md @@ -131,7 +131,7 @@ const config = fs.readFileSync('/etc/myapp/config.json', 'utf8'); // Drop read access to /etc/myapp after initialization process.permission.drop('fs.read', '/etc/myapp'); -// This will now throw ERR_ACCESS_DENIED +// This will now return false process.permission.has('fs.read', '/etc/myapp/config.json'); // false // Drop child process permission entirely @@ -212,7 +212,7 @@ $ node --permission index.js * `index.js` will be included in the allowed file system read list ```console -$ node -r /path/to/custom-require.js --permission index.js. +$ node -r /path/to/custom-require.js --permission index.js ``` * `/path/to/custom-require.js` will be included in the allowed file system read