I think you mean

    repository = normalizeUrl(repository);

!