Skip to content

Shouldn't a warning result in a return code ($?) higher then zero? #1430

@gerardjp

Description

@gerardjp

Hi All,

I'm working on some wrapper software and noticed a wrong return code on the commandline:

root@srvyy:~# wp --allow-root --path=/var/www/www.test.nl plugin deactivate p3-profile
Warning: The 'p3-profile' plugin could not be found.
(nb: the plugin name is actually p3-profiler)
root@srvyy:~# echo $?
0
root@srvyy:~# ls /not-here
ls: cannot access /not-here: No such file or directory
root@srvyy:~# echo $?
2
root@srvyy:~#

Shouldn't it produce an errorlevel higher then zero or am I missing something?

Thanx a lot.

Kind regards,

Gerard.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions