From 450081ee3e107962ec80696acb3a358f8ec044b7 Mon Sep 17 00:00:00 2001 From: Alexander Ljungberg Date: Wed, 30 Jan 2013 11:38:39 +0000 Subject: [PATCH] Fixed: 'cannot run program "ulimit"' error. When running on certain platforms the `ulimit` command is not available, which would crash the build script. This change simply refrains from using the `ulimit` command if it's not available. --- common.jake | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/common.jake b/common.jake index 937e5a9ac..839cce402 100644 --- a/common.jake +++ b/common.jake @@ -544,7 +544,12 @@ var minUlimit = 1024; global.checkUlimit = function() { - var p = OS.popen(["ulimit", "-n"]); + var ulimitPath = executableExists("ulimit"); + + if (!ulimitPath) + return; + + var p = OS.popen([ulimitPath, "-n"]); if (p.wait() === 0) {