Skip to content

Can we get wp plugin activate to return -1 when the plugin specified can't be found? #2002

@kitsunde

Description

@kitsunde

I have an ansible task like so:

- name: Activate the Mortgage Calculator plugin.
  sudo_user: www-data
  shell: wp plugin activate mortgage-calculator-plugin
    chdir={{wordpress_path}}

I noticed the mortgage-calculator-plugin wasn't installed and because the plugin wasn't in the plugins directory so it couldn't have activated, but it still returns 0. If it was -1 it would've stopped my provisioning with an error.

Could we make it return an error code so provisioning failures gets registered?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions