Skip to content

Commit

Permalink
fix #191: use correct pathname to download project
Browse files Browse the repository at this point in the history
Signed-off-by: Yan Zhang <[email protected]>
  • Loading branch information
Eskibear committed Nov 21, 2021
1 parent 917040d commit a157323
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/handler/GenerateProjectHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import * as extract from "extract-zip";
import * as fse from "fs-extra";
import * as path from "path";
import { URL } from "url";
import * as vscode from "vscode";
import { instrumentOperationStep } from "vscode-extension-telemetry-wrapper";
import { OperationCanceledError } from "../Errors";
Expand Down Expand Up @@ -80,7 +81,10 @@ export class GenerateProjectHandler extends BaseHandler {
`baseDir=${this.metadata.artifactId}`,
`dependencies=${this.metadata.dependencies.id}`,
];
return `${this.metadata.serviceUrl}/starter.zip?${params.join("&")}`;
const targetUrl = new URL(this.metadata.serviceUrl);
targetUrl.pathname = "/starter.zip";
targetUrl.search = `?${params.join("&")}`;
return targetUrl.toString();
}
}

Expand Down

0 comments on commit a157323

Please sign in to comment.