Skip to content

Event emitters don't seem to be working #4

@tandrewnichols

Description

@tandrewnichols

Does this look correct? (next is from async.each)

    stairs = new Stairs()
    stairs
      .step("#{env}: #{options._name}", actions[options._name])
      .step("#{env}: bump", !options.bump, utils.bump)
      .step("#{env}: write", options.dryRun, utils.write)
      .run.apply(stairs, [options].concat(args).concat(env))
      .on('error', -> console.log '1 error'; next())
      .on('done', -> console.log '1 done'; next())

Neither of the on handlers are logging anything, and the tests fail, so presumably, the events are not firing correctly . . . or I'm setting this up wrong.

Also tried it with

    stairs = new Stairs()
    stairs
      .step("#{env}: #{options._name}", actions[options._name])
      .step("#{env}: bump", !options.bump, utils.bump)
      .step("#{env}: write", options.dryRun, utils.write)
      .run.apply(stairs, [options].concat(args).concat(env))
    stairs.on('error', -> console.log '1 error'; next())
    stairs.on('done', -> console.log '1 done'; next())

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions