Skip to content
This repository has been archived by the owner on Dec 12, 2023. It is now read-only.

Commit

Permalink
Clean up urlRewrites
Browse files Browse the repository at this point in the history
  • Loading branch information
unional committed Nov 2, 2016
1 parent b08bd1e commit f7d1e2a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions src/install.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,13 @@ test('install', t => {
}
})
})
.then(
() => {
rc.urlRewrites = {}
},
() => {
rc.urlRewrites = {}
})
})

t.test('install empty', t => {
Expand Down
2 changes: 1 addition & 1 deletion src/utils/fs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ export const readHttp = throat(5, function readHttp (url: string): Promise<strin
// Check responses are "200 OK".
.use(popsicleStatus(200))
// Enable URL rewrite
.use(popsicleRewrite({} || rc.urlRewrites || {})) // Remove `{} ||` to restore
.use(popsicleRewrite(rc.urlRewrites || {}))
// Enable tracking of repeat users on the registry.
.use(function (request, next) {
if (request.Url.host === registryURL.host) {
Expand Down

0 comments on commit f7d1e2a

Please sign in to comment.