Skip to content

Commit 3c720c1

Browse files
authored
Merge branch 'main' into copilot/add-package-version-command
2 parents ecc830f + a198bca commit 3c720c1

4 files changed

Lines changed: 208 additions & 18 deletions

File tree

README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -361,6 +361,30 @@ wp package uninstall <name> [--insecure]
361361
Removing package directories and regenerating autoloader...
362362
Success: Uninstalled package.
363363

364+
365+
366+
### wp package is-installed
367+
368+
Checks if a given package is installed.
369+
370+
~~~
371+
wp package is-installed <name>
372+
~~~
373+
374+
Returns exit code 0 when installed, 1 when uninstalled.
375+
376+
**OPTIONS**
377+
378+
<name>
379+
The package to check.
380+
381+
**EXAMPLES**
382+
383+
# Check whether "foo/bar" is installed; exit status 0 if installed, otherwise 1
384+
$ wp package is-installed foo/bar
385+
$ echo $?
386+
1
387+
364388
## Installing
365389

366390
This package is included with WP-CLI itself, no additional installation necessary.

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@
4242
"package install",
4343
"package list",
4444
"package update",
45-
"package uninstall"
45+
"package uninstall",
46+
"package is-installed"
4647
]
4748
},
4849
"autoload": {

0 commit comments

Comments
 (0)