Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/packages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ export interface Status {
}

export class PackageError extends Error {
// Do not put PII (personally identifiable information) in the 'message' field as it will be logged to telemetry
constructor(public message: string,
public pkg: Package = null,
public innerError: any = null) {
Expand Down Expand Up @@ -167,7 +168,7 @@ function downloadFile(urlString: string, pkg: Package, logger: Logger, status: S
let request = https.request(options, response => {
if (response.statusCode === 301 || response.statusCode === 302) {
// Redirect - download from new location
resolve(downloadFile(response.headers.location, pkg, logger, status));
return resolve(downloadFile(response.headers.location, pkg, logger, status));
}

if (response.statusCode != 200) {
Expand Down