From a3bbe6c5d210fd95259f947d88a0f8b6e3936d64 Mon Sep 17 00:00:00 2001 From: Tom Hofman <32954544+ausernamedtom@users.noreply.github.com> Date: Tue, 9 Jan 2024 09:07:18 +0100 Subject: [PATCH] fix: additional path escaping issue #80 (#81) --- .vscode/settings.json | 2 +- plugin/mkcert/index.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 01dcac0..f1a2462 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,5 +1,5 @@ { "editor.codeActionsOnSave": { - "source.fixAll": true + "source.fixAll": "explicit" } } \ No newline at end of file diff --git a/plugin/mkcert/index.ts b/plugin/mkcert/index.ts index 34fda04..9d2093d 100644 --- a/plugin/mkcert/index.ts +++ b/plugin/mkcert/index.ts @@ -159,7 +159,7 @@ class Mkcert { } const mkcertBinary = await this.getMkcertBinary() - const commandStatement = `${mkcertBinary} -CAROOT` + const commandStatement = `${escape(mkcertBinary)} -CAROOT` debug(`Exec ${commandStatement}`) @@ -204,7 +204,7 @@ class Mkcert { await ensureDirExist(this.savePath) await this.retainExistedCA() - const cmd = `${mkcertBinary} -install -key-file ${escape( + const cmd = `${escape(mkcertBinary)} -install -key-file ${escape( this.keyFilePath )} -cert-file ${escape(this.certFilePath)} ${names}`