Skip to content

Commit

Permalink
doc: fix relative path mention in --allow-fs
Browse files Browse the repository at this point in the history
  • Loading branch information
RafaelGSS committed Nov 8, 2024
1 parent 58a8eb4 commit 4025e6d
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions doc/api/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -208,17 +208,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 --experimental-permission index.js
node:internal/modules/cjs/loader:162
const result = internalModuleStat(receiver, filename);
^
Expand All @@ -231,7 +226,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'
}
```

Expand Down Expand Up @@ -267,8 +262,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`

<!-- YAML
Expand Down

0 comments on commit 4025e6d

Please sign in to comment.