Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Glob workaround.

Reviewed by me.
  • Loading branch information...
commit 9d27c73bd952e78afc472b4242296a81defddce3 1 parent e1eb9a8
Francisco Ryan Tolmasky I tolmasky authored
Showing with 4 additions and 1 deletion.
  1. +4 −1 lib/jake.js
5 lib/jake.js
View
@@ -30,11 +30,14 @@ var FILE = require("file"),
FileCreationTask = require("jake/filecreationtask").FileCreationTask,
TaskManager = require("jake/taskmanager").TaskManager;
+// FIXME: MAJOR hack to get globs working.
FILE.glob = function(aPattern)
{
var OS = require("os");
- return OS.system("echo \"Dir.glob('" + OS.enquote(aPattern) + "')\" | ruby").split('\n');
+ OS.system("echo \"puts Dir.glob('" + aPattern + "')\" | ruby > /tmp/glob_fixme.txt");
+
+ return FILE.read("/tmp/glob_fixme.txt", {charsert:"UTF-8"}).split('\n').slice(0, -1);
}
var DEFAULT_JAKEFILES = ["jakefile", "Jakefile", "jakefile.js", "Jakefile.js", "jakefile.j", "Jakefile.j"];
Please sign in to comment.
Something went wrong with that request. Please try again.