Skip to content

Commit 61311ff

Browse files
committed
doc: fix relative path mention in --allow-fs
PR-URL: #55791 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
1 parent 815f21b commit 61311ff

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

doc/api/cli.md

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -206,20 +206,12 @@ The valid arguments for the `--allow-fs-read` flag are:
206206
* Multiple paths can be allowed using multiple `--allow-fs-read` flags.
207207
Example `--allow-fs-read=/folder1/ --allow-fs-read=/folder1/`
208208

209-
Paths delimited by comma (`,`) are no longer allowed.
210-
When passing a single flag with a comma a warning will be displayed.
211-
212209
Examples can be found in the [File System Permissions][] documentation.
213210

214-
Relative paths are NOT yet supported by the CLI flag.
215-
216211
The initializer module also needs to be allowed. Consider the following example:
217212

218213
```console
219-
$ node --experimental-permission t.js
220-
node:internal/modules/cjs/loader:162
221-
const result = internalModuleStat(filename);
222-
^
214+
$ node --experimental-permission index.js
223215

224216
Error: Access to this API has been restricted
225217
at stat (node:internal/modules/cjs/loader:162:18)
@@ -229,7 +221,7 @@ Error: Access to this API has been restricted
229221
at node:internal/main/run_main_module:23:47 {
230222
code: 'ERR_ACCESS_DENIED',
231223
permission: 'FileSystemRead',
232-
resource: '/Users/rafaelgss/repos/os/node/t.js'
224+
resource: '/Users/rafaelgss/repos/os/node/index.js'
233225
}
234226
```
235227

@@ -265,8 +257,6 @@ When passing a single flag with a comma a warning will be displayed.
265257

266258
Examples can be found in the [File System Permissions][] documentation.
267259

268-
Relative paths are NOT supported through the CLI flag.
269-
270260
### `--allow-wasi`
271261

272262
<!-- YAML

0 commit comments

Comments
 (0)