Skip to content
This repository was archived by the owner on Dec 11, 2024. It is now read-only.
This repository was archived by the owner on Dec 11, 2024. It is now read-only.

strange behavior with default middleware (rc-specific?) #86

@boneskull

Description

@boneskull

w/r/t the error with rc I was tracking down: the problem was I had a middleware configuration for rc:

this.use(cli.middleware.rc, {type: 'ini'}) //etc

I wanted an onload handler, but that's only allowed to be specified via configure(). So then I had both middleware() and configure() configurations, if that makes sense.

My WAG is that if a middleware returns a closure, cli-command is unable to detect whether or not it's been loaded already via the default loader (at about index.js:256), and does not throw.

The result of this was that running my program would fail silently. I would get absolutely no output, even from --help. The complete event was emitted, but I didn't know what to do with it.

Please let me know if this is an actual problem or user error, or a combination of the two. 😄

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions