From 8b515dc7a212766e0b0ca6e97332f30cef606834 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Fri, 31 Jan 2025 13:23:56 -0500 Subject: [PATCH 1/2] Add -W (--allow-write) to deno build instructions Without that run which asks to save results into external file would fail with error: Uncaught (in promise) PermissionDenied: Requires write access to "derivatives/bids-validator/deno-bids-validator.txt", specify the required permissions during compilation using `deno compile --allow-write` at writeFileSync (ext:deno_fs/30_fs.js:899:3) at Object.writeTextFileSync (ext:deno_fs/30_fs.js:962:10) at main (https://jsr.io/@bids/validator/2.0.1/src/main.ts:38:12) at eventLoopTick (ext:core/01_core.js:175:7) at async https://jsr.io/@bids/validator/2.0.1/src/bids-validator.ts:2:16 === Do not change lines below === { "chain": [], "cmd": "git-sedi ' -ERN' ' -ERWN'", "exit": 0, "extra_inputs": [], "inputs": [], "outputs": [], "pwd": "." } ^^^ Do not change lines above ^^^ --- README.md | 2 +- docs/user_guide/command-line.md | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 308c6bab..ac5a4978 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ The BIDS Validator can be run with the [Deno][] runtime (see [Deno - Installation][] for detailed installation instructions): ```shell -deno run -ERN jsr:@bids/validator +deno run -ERWN jsr:@bids/validator ``` Deno by default sandboxes applications like a web browser. diff --git a/docs/user_guide/command-line.md b/docs/user_guide/command-line.md index c8db5d14..88212cb0 100644 --- a/docs/user_guide/command-line.md +++ b/docs/user_guide/command-line.md @@ -10,19 +10,19 @@ In general, there is no need to install Deno applications. `deno run` allows running from the Javascript Repository: ```sh -deno run -ERN jsr:@bids/validator +deno run -ERWN jsr:@bids/validator ``` However, you can also install a lightweight script (into `$HOME/.deno/bin`): ```sh -deno install -ERN -g -n bids-validator jsr:@bids/validator +deno install -ERWN -g -n bids-validator jsr:@bids/validator ``` Or compile a bundled binary: ```sh -deno compile -ERN -o bids-validator jsr:@bids/validator +deno compile -ERWN -o bids-validator jsr:@bids/validator ``` ## Usage @@ -36,7 +36,7 @@ The BIDS Validator takes a single dataset as input: :sync: run ```sh -deno run -ERN jsr:@bids/validator +deno run -ERWN jsr:@bids/validator ``` ::: From 0e0dd2a042b277b1c02a3f54f004b9a75705e72d Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Fri, 31 Jan 2025 14:10:18 -0500 Subject: [PATCH 2/2] Add -W into README.md description of the CLI options used --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ac5a4978..c0b3432e 100644 --- a/README.md +++ b/README.md @@ -31,8 +31,8 @@ deno run -ERWN jsr:@bids/validator ``` Deno by default sandboxes applications like a web browser. -`-E`, `-R` and `-N` allow the validator to read environment variables, -local files, and network locations. +`-E`, `-R`, '-W', and `-N` allow the validator to read environment variables, +read/write local files, and read network locations. ### Configuration file