This is an automated email from the ASF dual-hosted git repository.

rabbah pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/openwhisk.git


The following commit(s) were added to refs/heads/master by this push:
     new 4f6778b  Specify npm command based on OS (#4755)
4f6778b is described below

commit 4f6778b74aede59cedab5d4ac20fe5a4c780bef7
Author: Neeraj Mangal <[email protected]>
AuthorDate: Sun Dec 1 20:22:59 2019 +0530

    Specify npm command based on OS (#4755)
---
 core/standalone/build.gradle | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/core/standalone/build.gradle b/core/standalone/build.gradle
index 0b38f64..320b5f6 100644
--- a/core/standalone/build.gradle
+++ b/core/standalone/build.gradle
@@ -15,6 +15,8 @@
  * limitations under the License.
  */
 
+import org.apache.tools.ant.taskdefs.condition.Os
+
 plugins {
     id 'maven'
     id 'org.scoverage'
@@ -52,8 +54,9 @@ task copyGWActions() {
             def zipFileName = actionName + ".zip"
             def actionDir = new File(routeMgmtDir, actionName)
             def zipFile = new File(routeBuildDir, zipFileName)
+            def npmCommand = (Os.isFamily(Os.FAMILY_WINDOWS)) ? "npm.cmd" : 
"npm"
             if (!zipFile.exists()) {
-                ant.exec(dir:actionDir, executable:"npm", failonerror:true){
+                ant.exec(dir:actionDir, executable:npmCommand, 
failonerror:true){
                     arg(line:"install")
                 }
                 ant.zip(destfile:zipFile){

Reply via email to