Skip to content

vue add does not wait invoke #5916

Open
@Benoit-Vasseur

Description

@Benoit-Vasseur

What problem does this feature solve?

I am working on a wrapper of this cli for my company in order to have a more guided experience.
My plan was to :
1- call vue create with only official plugins in the preset definition
2- loop on our custom plugins to call vue add in sequence

However vue add is not waiting the invoke, so my sequence loop is not really a sequence (risk of concurrent access if multiple plugins modify the same files).
Moreover, I wanted to commit the result of each add to be explicit but because add does not wait the invoke the git commit does not contain all the work of the plugin generator.

Why does add not wait invoke ? Is there a reason for this ? Can you add an option to await invoke ?

Thanks in advance for your reply.

What does the proposed API look like?

await invoke instead of invoke in add.js

I tried this patch and it seems to work well (for my use case) :).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions