Skip to content

Commit

Permalink
🐛 Automatically create the https folder.
Browse files Browse the repository at this point in the history
  • Loading branch information
jasontaylordev committed Nov 18, 2024
1 parent f911070 commit a6135d6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Web/ClientApp-React/aspnetcore-https.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ const baseFolder =
? `${process.env.APPDATA}/ASP.NET/https`
: `${process.env.HOME}/.aspnet/https`;

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

const certificateArg = process.argv.map(arg => arg.match(/--name=(?<value>.+)/i)).filter(Boolean)[0];
const certificateName = certificateArg ? certificateArg.groups.value : process.env.npm_package_name;

Expand Down
2 changes: 2 additions & 0 deletions src/Web/ClientApp/aspnetcore-https.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ const baseFolder =
? `${process.env.APPDATA}/ASP.NET/https`
: `${process.env.HOME}/.aspnet/https`;

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

const certificateArg = process.argv.map(arg => arg.match(/--name=(?<value>.+)/i)).filter(Boolean)[0];
const certificateName = certificateArg ? certificateArg.groups.value : process.env.npm_package_name;

Expand Down

0 comments on commit a6135d6

Please sign in to comment.