allow global Promise

Project: http://git-wip-us.apache.org/repos/asf/cordova-serve/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-serve/commit/20737ed4
Tree: http://git-wip-us.apache.org/repos/asf/cordova-serve/tree/20737ed4
Diff: http://git-wip-us.apache.org/repos/asf/cordova-serve/diff/20737ed4

Branch: refs/heads/master
Commit: 20737ed49b6c70a754a3ed5fc1aaf630afa3e82c
Parents: fd32d32
Author: Jesse MacFadyen <purplecabb...@gmail.com>
Authored: Thu Jun 29 14:06:35 2017 -0700
Committer: Jesse MacFadyen <purplecabb...@gmail.com>
Committed: Thu Jun 29 14:12:27 2017 -0700

----------------------------------------------------------------------
 src/exec.js | 7 +++++++
 1 file changed, 7 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-serve/blob/20737ed4/src/exec.js
----------------------------------------------------------------------
diff --git a/src/exec.js b/src/exec.js
index 2ab268d..9f3a625 100644
--- a/src/exec.js
+++ b/src/exec.js
@@ -31,7 +31,14 @@ module.exports = function (cmd, opt_cwd) {
     return new Promise(function(resolve,reject){
         try {
             var opt = {cwd: opt_cwd, maxBuffer: 1024000};
+            var timerID = 0;
+            if(process.platform === 'linux') {
+                timerID = setTimeout(function(){
+                    resolve('linux-timeout');
+                },5000);
+            }
             child_process.exec(cmd,opt,function (err, stdout, stderr) {
+                clearTimeout(timerID);
                 if (err) {
                     reject(new Error('Error executing "' + cmd + '": ' + 
stderr));
                 }


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@cordova.apache.org
For additional commands, e-mail: commits-h...@cordova.apache.org

Reply via email to