Open markandrus opened 8 years ago
I think the issue has to do with the way we split on ":" here.
Thanks Mark! For completeness, can you include a sample error as well?
On May 23, 2016, at 20:30, Mark Roberts notifications@github.com wrote:
Hi!
If you create a file task that includes a drive letter, for example
file('C:\foo', function() { // Do something });
task('bar', ['C:\foo']); then trying to run bar will fail. I discovered this after writing a bunch of platform-independent code using path.resolve, only to find it failed on Windows.
This issue is related to #252, but I think it might warrant a separate ticket since the issue seems more serious than if ":" were simply disallowed in tasks.
Thanks, Mark
— You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub
@welearnednothing sure thing. Here's a sample Jakefile
var fs = require('fs');
var path = require('path');
var foo = path.join(__dirname, 'foo');
file(foo, function() {
fs.closeSync(fs.openSync(foo, 'w'));
});
task('bar', [foo]);
When I run it on Windows, I get
C:\Users\mrobe\test-jake>jake bar
jake aborted.
Error: Unknown task "C:\Users\mrobe\test-jake\foo"
at TaskBase.nextPrereq (C:\Users\mrobe\test-jake\node_modules\jake\lib\task\task.js:181:15)
at TaskBase.runPrereqs (C:\Users\mrobe\test-jake\node_modules\jake\lib\task\task.js:155:14)
(See full trace by running task with --trace)
whereas on OS X it works fine.
@markandrus I've added you to the org -- use your commit-bit powers for good!
Hi!
If you create a
file
task that includes a drive letter, for examplethen trying to run
bar
will fail. I discovered this after writing a bunch of platform-independent code usingpath.resolve
, only to find it failed on Windows.This issue is related to #252, but I think it might warrant a separate ticket since the issue seems more serious than if ":" were simply disallowed in
task
s.Thanks, Mark