mirror of
https://github.com/denoland/deno.git
synced 2024-11-24 15:19:26 -05:00
fix: remove permission check in op_require_node_module_paths (#26645)
This commit is contained in:
parent
a346071dd2
commit
a8846eb70f
1 changed files with 1 additions and 4 deletions
|
@ -131,9 +131,6 @@ where
|
||||||
normalize_path(current_dir.join(from))
|
normalize_path(current_dir.join(from))
|
||||||
};
|
};
|
||||||
|
|
||||||
let from = ensure_read_permission::<P>(state, &from)
|
|
||||||
.map_err(RequireError::Permission)?;
|
|
||||||
|
|
||||||
if cfg!(windows) {
|
if cfg!(windows) {
|
||||||
// return root node_modules when path is 'D:\\'.
|
// return root node_modules when path is 'D:\\'.
|
||||||
let from_str = from.to_str().unwrap();
|
let from_str = from.to_str().unwrap();
|
||||||
|
@ -154,7 +151,7 @@ where
|
||||||
}
|
}
|
||||||
|
|
||||||
let mut paths = Vec::with_capacity(from.components().count());
|
let mut paths = Vec::with_capacity(from.components().count());
|
||||||
let mut current_path = from.as_ref();
|
let mut current_path = from.as_path();
|
||||||
let mut maybe_parent = Some(current_path);
|
let mut maybe_parent = Some(current_path);
|
||||||
while let Some(parent) = maybe_parent {
|
while let Some(parent) = maybe_parent {
|
||||||
if !parent.ends_with("node_modules") {
|
if !parent.ends_with("node_modules") {
|
||||||
|
|
Loading…
Reference in a new issue