From 61311ffc39612ec360d3ff85302ec5bf4ee69059 Mon Sep 17 00:00:00 2001 From: Rafael Gonzaga Date: Tue, 19 Nov 2024 15:31:29 -0300 Subject: [PATCH] doc: fix relative path mention in --allow-fs PR-URL: https://github.com/nodejs/node/pull/55791 Reviewed-By: Luigi Pinca Reviewed-By: Joyee Cheung Reviewed-By: Chemi Atlow --- doc/api/cli.md | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/doc/api/cli.md b/doc/api/cli.md index 85920e71be2..6972c034cb3 100644 --- a/doc/api/cli.md +++ b/doc/api/cli.md @@ -206,20 +206,12 @@ The valid arguments for the `--allow-fs-read` flag are: * Multiple paths can be allowed using multiple `--allow-fs-read` flags. Example `--allow-fs-read=/folder1/ --allow-fs-read=/folder1/` -Paths delimited by comma (`,`) are no longer allowed. -When passing a single flag with a comma a warning will be displayed. - Examples can be found in the [File System Permissions][] documentation. -Relative paths are NOT yet supported by the CLI flag. - The initializer module also needs to be allowed. Consider the following example: ```console -$ node --experimental-permission t.js -node:internal/modules/cjs/loader:162 - const result = internalModuleStat(filename); - ^ +$ node --experimental-permission index.js Error: Access to this API has been restricted at stat (node:internal/modules/cjs/loader:162:18) @@ -229,7 +221,7 @@ Error: Access to this API has been restricted at node:internal/main/run_main_module:23:47 { code: 'ERR_ACCESS_DENIED', permission: 'FileSystemRead', - resource: '/Users/rafaelgss/repos/os/node/t.js' + resource: '/Users/rafaelgss/repos/os/node/index.js' } ``` @@ -265,8 +257,6 @@ When passing a single flag with a comma a warning will be displayed. Examples can be found in the [File System Permissions][] documentation. -Relative paths are NOT supported through the CLI flag. - ### `--allow-wasi`