spawn to set shell option

Summary: This is needed on Windows, otherwise it just throws an error when using spawn.

Reviewed By: passy

Differential Revision: D47832379

fbshipit-source-id: c1a5094c2e72683a695949cd99b2a1054f01aced
This commit is contained in:
Lorenzo Blasa
2023-07-27 07:06:58 -07:00
committed by Facebook GitHub Bot
parent 5b2d20e0e0
commit 566125af3f

View File

@@ -333,6 +333,7 @@ async function packNpmArchive(dir: string, versionNumber: any) {
const archive = path.resolve(distDir, 'flipper-server.tgz'); const archive = path.resolve(distDir, 'flipper-server.tgz');
await spawn('yarn', ['pack', '--filename', archive], { await spawn('yarn', ['pack', '--filename', archive], {
cwd: dir, cwd: dir,
shell: true,
stdio: 'inherit', stdio: 'inherit',
}); });
@@ -357,6 +358,7 @@ async function runPostBuildAction(archive: string, dir: string) {
], ],
{ {
stdio: 'inherit', stdio: 'inherit',
shell: true,
}, },
); );
} else if (argv.start) { } else if (argv.start) {
@@ -367,6 +369,7 @@ async function runPostBuildAction(archive: string, dir: string) {
{ {
cwd: dir, cwd: dir,
stdio: 'inherit', stdio: 'inherit',
shell: true,
}, },
); );
} }
@@ -396,6 +399,7 @@ async function yarnInstall(dir: string) {
{ {
cwd: dir, cwd: dir,
stdio: 'inherit', stdio: 'inherit',
shell: true,
}, },
); );