You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Regardless of the root specified, running expandGlob will prompt for --allow-read access to the CWD.
main.ts:
import {expandGlob} from 'https://deno.land/[email protected]/fs/expand_glob.ts';
for await (const entry of expandGlob('**/*.js', {root: './subfolder'})) {
console.log(entry);
}
Running deno run main.ts --allow-read=./subfolder
will produce:
⚠️ ️Deno requests read access to <CWD>. Run again with --allow-read to bypass this prompt.
Allow? [y/n (y = yes allow, n = no deny)] n
error: Uncaught PermissionDenied: Requires read access to <CWD>, run again with the --allow-read flag
: joinGlobs([Deno.cwd(), root], globOptions);
^
at Object.opSync (deno:core/01_core.js:172:12)
at Object.cwd (deno:runtime/js/30_fs.js:65:17)
at expandGlob (https://deno.land/[email protected]/fs/expand_glob.ts:87:23)
at expandGlob.next (<anonymous>)
at file:///C:/path/to/main.ts:5:18
Swapping both or either of the root or --allow-read paths for absolute paths produces a similar permission denial:
⚠️ ️Deno requests read access to "C:\path\to\subfolder". Run again with --allow-read to bypass this prompt.
Allow? [y/n (y = yes allow, n = no deny)] n
error: Uncaught (in promise) PermissionDenied: Requires read access to "C:\path\to\subfolder", run again with the --allow-read flag
const info = await Deno.stat(path);
^
at async Object.stat (deno:runtime/js/30_fs.js:230:17)
at async _createWalkEntry (https://deno.land/[email protected]/fs/walk.ts:25:16)
at async expandGlob (https://deno.land/[email protected]/fs/expand_glob.ts:108:21)
at async file:///C:/path/to/main.ts:5:18
Expected behavior
Using a root path that is within the boundary granted by --allow-read should just work, it should not prompt for read permissions of the entire CWD.
Environment
OS: Windows 11
deno version: 1.22.2
std version: 0.95.0
The text was updated successfully, but these errors were encountered:
Regardless of the root specified, running
expandGlob
will prompt for--allow-read
access to the CWD.main.ts:
Running
deno run main.ts --allow-read=./subfolder
will produce:
Swapping both or either of the root or --allow-read paths for absolute paths produces a similar permission denial:
Expected behavior
Using a root path that is within the boundary granted by
--allow-read
should just work, it should not prompt for read permissions of the entire CWD.Environment
The text was updated successfully, but these errors were encountered: