From 6d9907d283bffa0f12d9d302dab012bf4b16fd7c Mon Sep 17 00:00:00 2001 From: Pau Date: Wed, 4 Nov 2015 09:51:08 +0100 Subject: [PATCH 1/2] Fixed shell:package task command on Windows systems The extra quotes on the command made the task crash on windows since the quote was added to the path. --- gruntfile.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/gruntfile.js b/gruntfile.js index 6d8057ca4..1560fa029 100644 --- a/gruntfile.js +++ b/gruntfile.js @@ -10,6 +10,13 @@ module.exports = function(grunt) { var outDir = "bin/dist/modules"; var moduleOutDir = path.join(outDir, "nativescript-angular"); + + var shellPackageCommand = '' + if (process.platform === 'win32') { + shellPackageCommand = "npm pack " + moduleOutDir; + } else { + shellPackageCommand = "npm pack '" + moduleOutDir + "'"; + } var runEnv = JSON.parse(JSON.stringify(process.env)); runEnv['NODE_PATH'] = 'bin/dist/modules'; @@ -154,7 +161,7 @@ module.exports = function(grunt) { options: nsSubDir }, package: { - command: "npm pack '" + moduleOutDir + "'" + command: shellPackageCommand } }, env: { From 323b3a2e5ea7c860270fb9700d6a07cee4a68e15 Mon Sep 17 00:00:00 2001 From: Pau Date: Thu, 5 Nov 2015 15:23:26 +0100 Subject: [PATCH 2/2] Windows fix maintaining quotes --- gruntfile.js | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/gruntfile.js b/gruntfile.js index 1560fa029..5eda6b12c 100644 --- a/gruntfile.js +++ b/gruntfile.js @@ -10,13 +10,6 @@ module.exports = function(grunt) { var outDir = "bin/dist/modules"; var moduleOutDir = path.join(outDir, "nativescript-angular"); - - var shellPackageCommand = '' - if (process.platform === 'win32') { - shellPackageCommand = "npm pack " + moduleOutDir; - } else { - shellPackageCommand = "npm pack '" + moduleOutDir + "'"; - } var runEnv = JSON.parse(JSON.stringify(process.env)); runEnv['NODE_PATH'] = 'bin/dist/modules'; @@ -161,7 +154,7 @@ module.exports = function(grunt) { options: nsSubDir }, package: { - command: shellPackageCommand + command: "npm pack \"" + moduleOutDir + "\"" } }, env: {