Skip to content
Snippets Groups Projects
Commit a09475d2 authored by Rhys Arkins's avatar Rhys Arkins
Browse files

fix(docker): match https prefix

parent 7f47d457
No related branches found
No related tags found
No related merge requests found
...@@ -19,7 +19,7 @@ function massageRegistry(input, registryUrls) { ...@@ -19,7 +19,7 @@ function massageRegistry(input, registryUrls) {
if (!registry || registry === 'docker.io') { if (!registry || registry === 'docker.io') {
registry = 'index.docker.io'; registry = 'index.docker.io';
} }
if (!registry.match('$https?://')) { if (!registry.match('^https?://')) {
registry = `https://${registry}`; registry = `https://${registry}`;
} }
return registry; return registry;
......
...@@ -193,13 +193,13 @@ exports[`api/docker getPkgReleases uses custom registry 1`] = ` ...@@ -193,13 +193,13 @@ exports[`api/docker getPkgReleases uses custom registry 1`] = `
[MockFunction] { [MockFunction] {
"calls": Array [ "calls": Array [
Array [ Array [
"https://https://registry.company.com/v2/", "https://registry.company.com/v2/",
Object { Object {
"throwHttpErrors": false, "throwHttpErrors": false,
}, },
], ],
Array [ Array [
"https://https://registry.company.com/v2/library/node/tags/list?n=10000", "https://registry.company.com/v2/library/node/tags/list?n=10000",
Object { Object {
"headers": Object {}, "headers": Object {},
"json": true, "json": true,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment