summaryrefslogtreecommitdiff
path: root/cli/specifier_handler.rs
diff options
context:
space:
mode:
authorcrowlKats <13135287+crowlKats@users.noreply.github.com>2021-04-12 04:15:43 +0200
committerGitHub <noreply@github.com>2021-04-12 11:15:43 +0900
commitfefe93c91b63e35bf88f5f432f0cca09948d0623 (patch)
treebf8f3e031cf558161277e01e4ca2e2c7817ef6ab /cli/specifier_handler.rs
parent8b49d948f58e0665e87e63f7e154ab53fa60a939 (diff)
feat(runtime/permissions): prompt fallback (#9376)
Co-authored-by: Yoshiya Hinosawa <stibium121@gmail.com> Co-authored-by: Bartek IwaƄczuk <biwanczuk@gmail.com>
Diffstat (limited to 'cli/specifier_handler.rs')
-rw-r--r--cli/specifier_handler.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/cli/specifier_handler.rs b/cli/specifier_handler.rs
index 58815e15c..066ed87f4 100644
--- a/cli/specifier_handler.rs
+++ b/cli/specifier_handler.rs
@@ -257,7 +257,7 @@ impl SpecifierHandler for FetchHandler {
// When the module graph fetches dynamic modules, the set of dynamic
// permissions need to be applied. Other static imports have all
// permissions.
- let permissions = if is_dynamic {
+ let mut permissions = if is_dynamic {
self.runtime_permissions.clone()
} else {
Permissions::allow_all()
@@ -267,7 +267,7 @@ impl SpecifierHandler for FetchHandler {
async move {
let source_file = file_fetcher
- .fetch(&requested_specifier, &permissions)
+ .fetch(&requested_specifier, &mut permissions)
.await
.map_err(|err| {
let err = if let Some(e) = err.downcast_ref::<std::io::Error>() {