File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed
workspaces/arborist/lib/arborist Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -727,13 +727,16 @@ module.exports = cls => class Reifier extends cls {
727727 // ${REGISTRY} or something. This has to be threaded through the
728728 // Shrinkwrap and Node classes carefully, so for now, just treat
729729 // the default reg as the magical animal that it has been.
730- // const resolvedURL = new URL(resolved)
731- const resolvedURL = hgi . parseUrl ( resolved )
730+ let resolvedURL = hgi . parseUrl ( resolved )
732731
733732 if ( ! resolvedURL ) {
734- // if we could not parse the url at all then returning nothing
735- // here means it will get removed from the tree in the next step
736- return
733+ try {
734+ resolvedURL = new URL ( resolved )
735+ } catch {
736+ // if we could not parse the url at all then returning nothing
737+ // here means it will get removed from the tree in the next step
738+ return
739+ }
737740 }
738741
739742 if ( ( this . options . replaceRegistryHost === resolvedURL . hostname )
You can’t perform that action at this time.
0 commit comments