removing tag support for custom url

This commit is contained in:
Jeffrey Morgan 2015-04-15 15:28:50 -04:00
parent e4491bd899
commit ebc1143723
1 changed files with 2 additions and 4 deletions

View File

@ -35,7 +35,6 @@ ipc.on('application:quitting', opts => {
ipc.on('application:open-url', opts => {
var repoRegexp = /[a-z0-9]+(?:[._-][a-z0-9]+)*/;
var tagRegexp = /[\w][\w.-]{0,127}/;
var parser = document.createElement('a');
parser.href = opts.url;
@ -48,14 +47,13 @@ ipc.on('application:open-url', opts => {
var type = tokens[0];
var method = tokens[1];
var repo = tokens.slice(2).join('/');
var tag = parser.tag || 'latest';
if (repo.indexOf('/') !== -1 || !repoRegexp.test(repo) || !tagRegexp.test(tag)) {
if (repo.indexOf('/') !== -1 || !repoRegexp.test(repo)) {
return;
}
if (type === 'repository' && method === 'run') {
ContainerStore.setPending(repo, tag);
ContainerStore.setPending(repo, 'latest');
}
});