From 761666905ff75fde2ef93c2f206b8795b07cfc9e Mon Sep 17 00:00:00 2001 From: arthur-cheung Date: Sat, 21 Aug 2021 12:02:36 +1000 Subject: [PATCH] Added shell: true option to spawnSync to help parse the arguments correctly. --- .../serverless-single-page-app-plugin/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aws-node-single-page-app-via-cloudfront/serverless-single-page-app-plugin/index.js b/aws-node-single-page-app-via-cloudfront/serverless-single-page-app-plugin/index.js index dfc3e319b..eed09081c 100644 --- a/aws-node-single-page-app-via-cloudfront/serverless-single-page-app-plugin/index.js +++ b/aws-node-single-page-app-via-cloudfront/serverless-single-page-app-plugin/index.js @@ -44,7 +44,7 @@ class ServerlessPlugin { if (this.serverless.variables.service.provider.profile) { command = `${command} --profile ${this.serverless.variables.service.provider.profile}`; } - const result = spawnSync(command, args); + const result = spawnSync(command, args, { shell: true }); const stdout = result.stdout.toString(); const sterr = result.stderr.toString(); if (stdout) {