From 33540efd6481ef07a93908fd6ea8c7e7219d82ca Mon Sep 17 00:00:00 2001 From: Erik Marks <25517051+rekmarks@users.noreply.github.com> Date: Wed, 29 Nov 2023 19:13:54 -0800 Subject: [PATCH] Quote `editor.path` argument The `editor.path` string can contain spaces, e.g. `/Applications/Visual Studio Code.app/...`. This string is passed to `execa()`, which attempts to execute it as a command in the user's shell. On some systems, this string must be quoted, or else the shell will interpret the substring until the first space as the command, and either error or execute the wrong thing. --- src/release-specification.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/release-specification.ts b/src/release-specification.ts index a81c4ea..e35101d 100644 --- a/src/release-specification.ts +++ b/src/release-specification.ts @@ -123,7 +123,7 @@ export async function waitForUserToEditReleaseSpecification( ); const promiseForEditorCommand = runCommand( - editor.path, + `"${editor.path}"`, [...editor.args, releaseSpecificationPath], { stdio: 'inherit',