From 7c73fdff37f12649479efbd0919f91eaec5d1612 Mon Sep 17 00:00:00 2001 From: Daniel Schep Date: Fri, 8 Feb 2019 12:42:05 -0500 Subject: [PATCH] windows golang chmod for deploy func -f too --- lib/plugins/package/lib/packageService.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/plugins/package/lib/packageService.js b/lib/plugins/package/lib/packageService.js index 1cb8c6ed5..48a747d67 100644 --- a/lib/plugins/package/lib/packageService.js +++ b/lib/plugins/package/lib/packageService.js @@ -123,9 +123,16 @@ module.exports = { } const zipFileName = `${functionName}.zip`; + const filesToChmodPlusX = [] + if (process.platfrom === 'win32') { + const runtime = functionName.runtime || this.serverless.service.provider.runtime; + if (runtime).startsWith('go') { + filesToChmodPlusX.push(functionObject.handler) + } + } return this.resolveFilePathsFunction(functionName).then(filePaths => - this.zipFiles(filePaths, zipFileName).then(artifactPath => { + this.zipFiles(filePaths, zipFileName, undefined, filesToChmodPlusX).then(artifactPath => { functionObject.package = { artifact: artifactPath, };