Merge pull request #5192 from bhaskarbalusani/master

Update spawn API with {shell=true}
This commit is contained in:
Takahiro Horike 2018-08-07 11:10:05 +09:00 committed by GitHub
commit c093e39849
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -174,7 +174,8 @@ class AwsInvokeLocal {
return new BbPromise(resolve => {
const python = spawn(runtime,
['-u', path.join(__dirname, 'invoke.py'), handlerPath, handlerName], { env: process.env });
['-u', path.join(__dirname, 'invoke.py'), handlerPath, handlerName],
{ env: process.env }, { shell: true });
python.stdout.on('data', (buf) => this.serverless.cli.consoleLog(buf.toString()));
python.stderr.on('data', (buf) => this.serverless.cli.consoleLog(buf.toString()));
python.stdin.write(input);
@ -191,7 +192,7 @@ class AwsInvokeLocal {
`-DhandlerName=${handlerName}`,
'-jar',
path.join(__dirname, 'java', 'target', 'invoke-bridge-1.0.jar'),
]);
], { shell: true });
this.serverless.cli.log([
'In order to get human-readable output,',