Skip to content

Warn for unsupported package manager flags instead of silently ignoring #1914

Description

@liangmiQwQ

Description

vp pm is a package manager compatibility layer, since different underlying package managers can have some small differences. It is common to meet cases that there is a --abc flag can be passed to Xpm, but not to Ypm.

The current Vite+'s behavior is not united. It sometimes prints a warning (e.g. --fix-lockfile, --offline, --latest) but it also silently ignores some of them (e.g. --workspace, --save-catalog), which may make users confused.

Suggested solution

We are supposed to show warnings for these cases instead of silently ignoring, it can help users or agents know how to use the package manager correctly.

As for the implementation, I think checking and writing all of them by hand can be a little bit troublesome. We'd better to find a way to check them unitedly or use Rust's language feature like macro or Drop trait to reduce complex works.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Priority

    None yet

    Start date

    None yet

    Target date

    None yet

    Effort

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions