$conf, $runtime; function_exists('chdir') AND chdir(APP_PATH); $r = 'mysql' == $conf['cache']['type'] ? website_set('runtime', $runtime) : cache_set('runtime', $runtime); } function runtime_truncate() { global $conf; 'mysql' == $conf['cache']['type'] ? website_set('runtime', '') : cache_delete('runtime'); } register_shutdown_function('runtime_save'); ?>wp cli - XDG-OPEN is not recognized by WP CLI admin command|Programmer puzzle solving
最新消息:Welcome to the puzzle paradise for programmers! Here, a well-designed puzzle awaits you. From code logic puzzles to algorithmic challenges, each level is closely centered on the programmer's expertise and skills. Whether you're a novice programmer or an experienced tech guru, you'll find your own challenges on this site. In the process of solving puzzles, you can not only exercise your thinking skills, but also deepen your understanding and application of programming knowledge. Come to start this puzzle journey full of wisdom and challenges, with many programmers to compete with each other and show your programming wisdom! Translated with DeepL.com (free version)

wp cli - XDG-OPEN is not recognized by WP CLI admin command

matteradmin7PV0评论

So i installed the wp admin package, but i can't seem to get her working, an error pops up telling me xdg-open doenst exist.. For install i used:

wp package install [email protected]:wp-cli/admin-command.git
Installing package wp-cli/admin-command (dev-master)
Updating ~.wp-cli\packages\composer.json to require the package...
Registering [email protected]:wp-cli/admin-command.git as a VCS repository...
Using Composer to install the package...
---
Loading composer repositories with package information
Updating dependencies
Resolving dependencies through SAT
Looking at all rules.

Dependency resolution completed in 0.385 seconds
Analyzed 6619 packages to resolve dependencies
Analyzed 474197 rules to resolve dependencies
Package operations: 1 install, 0 updates, 0 removals
Installs: wp-cli/admin-command:dev-master 384f6d3
 - Installing wp-cli/admin-command (dev-master 384f6d3)
Writing lock file
Generating autoload files
---
Success: Package installed.

Now checking if she's there

wp admin --info
'xdg-open' is not recognized as an internal or external command,
operable program or batch file.

So what's going wrong, how can i get the wp admin command to run? btw, im running WP-CLI 2.0.1 on win10 from powershell. Any help would be greatly appreciated.

So i installed the wp admin package, but i can't seem to get her working, an error pops up telling me xdg-open doenst exist.. For install i used:

wp package install [email protected]:wp-cli/admin-command.git
Installing package wp-cli/admin-command (dev-master)
Updating ~.wp-cli\packages\composer.json to require the package...
Registering [email protected]:wp-cli/admin-command.git as a VCS repository...
Using Composer to install the package...
---
Loading composer repositories with package information
Updating dependencies
Resolving dependencies through SAT
Looking at all rules.

Dependency resolution completed in 0.385 seconds
Analyzed 6619 packages to resolve dependencies
Analyzed 474197 rules to resolve dependencies
Package operations: 1 install, 0 updates, 0 removals
Installs: wp-cli/admin-command:dev-master 384f6d3
 - Installing wp-cli/admin-command (dev-master 384f6d3)
Writing lock file
Generating autoload files
---
Success: Package installed.

Now checking if she's there

wp admin --info
'xdg-open' is not recognized as an internal or external command,
operable program or batch file.

So what's going wrong, how can i get the wp admin command to run? btw, im running WP-CLI 2.0.1 on win10 from powershell. Any help would be greatly appreciated.

Share Improve this question asked Nov 1, 2018 at 9:48 DGRFDSGNDGRFDSGN 16711 bronze badges 14
  • 1 I'm not sure windows is supported. Checking this ticket, it seems to yet focus on Linux (xdg-open) and Mac (open). You could create an issue on their GitHub – kero Commented Nov 1, 2018 at 9:51
  • So no wp admin support for win ? @kero :'( – DGRFDSGN Commented Nov 1, 2018 at 9:53
  • Ticket filed @ github/wp-cli/admin-command/issues/15 – DGRFDSGN Commented Nov 1, 2018 at 10:00
  • Waiting for pull request to test usage of 'start' on win platform – DGRFDSGN Commented Nov 6, 2018 at 11:33
  • Can you run php -r 'var_dump(PHP_OS);' from your powershell and if so, what does it return? – kero Commented Nov 6, 2018 at 12:00
 |  Show 9 more comments

2 Answers 2

Reset to default 2

This happened due to Windows not yet being supported.

With PR#18 this was resolved, update the package to the latest version and it will work on Windows machines.

So xdg-open is not supported on Windows, therefor the code has been updated to check for a Windows OS and use start Check out this repo if you cant wait for the merge with master.

Will leave this Question here untill everything is merged, so people experiencing a similar problem have some reference. Thanks @king-kero @schlessera for the quick support@github!

Post a comment

comment list (0)

  1. No comments so far