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) {