Skip to content

Commit a198bca

Browse files
authored
Merge pull request #214 from baizmandesign/feature/is-installed-command-2
2 parents 8c902bf + 2cc93b5 commit a198bca

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
@@ -297,6 +297,30 @@ wp package uninstall <name> [--insecure]
297297
Removing package directories and regenerating autoloader...
298298
Success: Uninstalled package.
299299

300+
301+
302+
### wp package is-installed
303+
304+
Checks if a given package is installed.
305+
306+
~~~
307+
wp package is-installed <name>
308+
~~~
309+
310+
Returns exit code 0 when installed, 1 when uninstalled.
311+
312+
**OPTIONS**
313+
314+
<name>
315+
The package to check.
316+
317+
**EXAMPLES**
318+
319+
# Check whether "foo/bar" is installed; exit status 0 if installed, otherwise 1
320+
$ wp package is-installed foo/bar
321+
$ echo $?
322+
1
323+
300324
## Installing
301325

302326
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
@@ -41,7 +41,8 @@
4141
"package install",
4242
"package list",
4343
"package update",
44-
"package uninstall"
44+
"package uninstall",
45+
"package is-installed"
4546
]
4647
},
4748
"autoload": {

0 commit comments

Comments
 (0)