diff options
author | David Sherret <dsherret@users.noreply.github.com> | 2022-12-01 11:01:19 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-01 11:01:19 -0500 |
commit | fafb3eebaf27cc2ef3ffaa10be8a0c5d78a112d0 (patch) | |
tree | 66a10aa95fd98903d19d49f2085d09116296afdc /cli/tools/vendor/specifiers.rs | |
parent | 0a82f3c0e96cb0f176e98663d5eb8dc251b191d2 (diff) |
fix(vendor): properly handle bare specifiers that start with http (#16885)
Diffstat (limited to 'cli/tools/vendor/specifiers.rs')
-rw-r--r-- | cli/tools/vendor/specifiers.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/cli/tools/vendor/specifiers.rs b/cli/tools/vendor/specifiers.rs index 9d513cc92..21ae2ca85 100644 --- a/cli/tools/vendor/specifiers.rs +++ b/cli/tools/vendor/specifiers.rs @@ -69,7 +69,8 @@ pub fn is_remote_specifier(specifier: &ModuleSpecifier) -> bool { } pub fn is_remote_specifier_text(text: &str) -> bool { - text.trim_start().to_lowercase().starts_with("http") + let text = text.trim_start().to_lowercase(); + text.starts_with("http:") || text.starts_with("https:") } pub fn sanitize_filepath(text: &str) -> String { |