Skip to content

Commit

Permalink
"Start new PWA" path separator fix for non-Windows platforms
Browse files Browse the repository at this point in the history
Currently, the "Start new PWA" flow results in the following error on macOS:

```A system error occurred (ENOENT: no such file or directory, rename '/REDACTED\decompressedTemplate\pwa-starter-main' -> '/REDACTED\REDACTED')```
  • Loading branch information
joellimberg committed Feb 16, 2024
1 parent ab2bbca commit cfbae98
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions apps/pwabuilder-vscode/src/services/new-pwa-starter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,10 +141,10 @@ export function isNpmInstalled(): boolean {
async function fetchFromGithub(): Promise<string> {
const streamPipeline = promisify(pipeline);

const fetchedZipPath: string = `${repositoryParentURI?.fsPath}\\fetchedTemplate.zip`;
const decompressedZipPath: string = `${repositoryParentURI?.fsPath}\\decompressedTemplate`;
const decompressedRepoPath: string = `${decompressedZipPath}\\pwa-starter-main`;
const finalLocationPath: string = `${repositoryParentURI?.fsPath}\\${repositoryName}`;
const fetchedZipPath: string = `${repositoryParentURI?.fsPath}/fetchedTemplate.zip`;
const decompressedZipPath: string = `${repositoryParentURI?.fsPath}/decompressedTemplate`;
const decompressedRepoPath: string = `${decompressedZipPath}/pwa-starter-main`;
const finalLocationPath: string = `${repositoryParentURI?.fsPath}/${repositoryName}`;

const res = await fetch(starterRepositoryURI);
if(res.body) {
Expand All @@ -164,4 +164,4 @@ function inputCancelledWarning(): void {

export function noNpmInstalledWarning(): void {
vscode.window.showWarningMessage(noNpmWarning);
}
}

0 comments on commit cfbae98

Please sign in to comment.