Skip to content

Problem if the first argument of a callback is not error #13

@clarkf

Description

@clarkf

I recently tried using Step with path.exists, which doesn't pass an error argument as the first argument to the callback. Here's the script I tested:

var Step = require('step'),
    path = require('path');
var stuff = ['file1', 'file2', 'file3', 'file4'];
Step(
    function () {
        var group = this.group();
        stuff.forEach(function (item) {
            path.exists(item, group());
        });
    },
    function (err, list) {
        console.log(err);
        console.log(list);
    }
);

This should output null (or some other falsy value) for error, and an array containing false: [false, false, false, false]. Instead, we get:

$ node stepissue.js 
undefined
[ undefined, undefined, undefined, undefined ]

I don't think this is a version compatibility issue, but for good measure, I'm running Step 0.0.4, node 0.4.1 on Ubuntu 10.10.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions