I'm trying to launch a cordova command with a target device. I've tested the command and it works but when I try to generate it with my code, it ignores the equal sign and therefore won't run. This code does work just not with the addition of "--target='iPhone-7-Plus"

return new Promise((resolve, reject) => { const executable = "ionic"; const arguments = [ "cordova", buildOnly ? "build" : "run", platform, "--no-interactive", "--verbose", "--target='iPhone-7-Plus'" ].concat(releaseDev === "release" ? ["--prod", "--release"] : []); console.log(executable, arguments.join(" ")); const child = spawn(executable, arguments, { stdio: "inherit" }); child.on("close", () => resolve()); child.on("error", err => reject(err)); });

What am I doing wrong here? Why would it be ignoring my equal sign only but the rest of the command gets added?