From b597decbf25c39bb7bc7878232deaf93e62fa39e Mon Sep 17 00:00:00 2001 From: Shane McLaughlin Date: Sat, 6 Jan 2024 23:46:53 -0600 Subject: [PATCH] Fix `target` option on macOS (#332) --- index.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/index.js b/index.js index 3e1a5af..7af98a3 100644 --- a/index.js +++ b/index.js @@ -238,14 +238,15 @@ const baseOpen = async options => { } } - if (options.target) { - cliArguments.push(options.target); - } - if (platform === 'darwin' && appArguments.length > 0) { cliArguments.push('--args', ...appArguments); } + // This has to come after `--args`. + if (options.target) { + cliArguments.push(options.target); + } + const subprocess = childProcess.spawn(command, cliArguments, childProcessOptions); if (options.wait) {