Skip to content

Commit

Permalink
🐛 Catch error in copying assets
Browse files Browse the repository at this point in the history
  • Loading branch information
AnandChowdhary committed Jan 25, 2021
1 parent 5b792c7 commit 811b6a4
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions post-process.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,10 @@ export const postProcess = async () => {
await remove(join(".", "__sapper__", "export", baseUrl));
}

if (pathExists(join(".", "assets")))
await copy(join(".", "assets"), join("__sapper__", "export"), { recursive: true });
try {
if (await pathExists(join(".", "assets")))
await copy(join(".", "assets"), join("__sapper__", "export"), { recursive: true });
} catch (error) {}

if (config["status-website"] && config["status-website"].cname)
await writeFile(join(".", "__sapper__", "export", "CNAME"), config["status-website"].cname);
Expand Down

0 comments on commit 811b6a4

Please sign in to comment.