Skip to content
This repository was archived by the owner on Feb 12, 2022. It is now read-only.
This repository was archived by the owner on Feb 12, 2022. It is now read-only.

Problems with preinstall #294

@tnoonan-salesforce

Description

@tnoonan-salesforce

@jdxcode was trying out this the preinstall change.

I'm running into erratic async behavior with it.

In the most simple case I have this:
async function preinstall(config: any, {plugin, tag}: {plugin: any, tag: string}): Promise {
return new Promise((resolve, reject) => {
console.log("1");
console.log("2");
reject(new Error("Fail install"));
});
}
export = preinstall;

And this results in

$ bin/run plugins:install cli-engine-example-plugin
Installing plugin cli-engine-example-plugin...
1
Installing plugin cli-engine-example-plugin... !
▸ Fail install
$

Note that "2" in never printed and "Installing plugin cli-engine-example-plugin..." is printed twice.

Ideas? I'm using node 8.5.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions