Skip to content

Commit

Permalink
fix: #519 error in dev middleware when cert dir doesn't exist
Browse files Browse the repository at this point in the history
  • Loading branch information
ascott18 committed Jan 28, 2025
1 parent 328f68c commit 6e6e262
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# 5.3.2

## Fixes

- Fix error in .NET 9 thrown by vite development middleware if the HTTPS cert directory doesn't exist.

# 5.3.1

## Fixes
Expand Down
4 changes: 4 additions & 0 deletions src/coalesce-vue/src/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -526,6 +526,10 @@ export async function getCertPaths(certName?: string) {
? `${process.env.APPDATA}/ASP.NET/https`
: `${process.env.HOME}/.aspnet/https`;

if (!fs.existsSync(baseFolder)) {
fs.mkdirSync(baseFolder, { recursive: true });
}

const certificateArg =
certName ??
process.argv
Expand Down

0 comments on commit 6e6e262

Please sign in to comment.