[wp-trac] [WordPress Trac] #63564: Dev environment should incorporate enhancements from wp-env for speed and non-interactive usage
WordPress Trac
noreply at wordpress.org
Thu Jun 12 23:54:13 UTC 2025
#63564: Dev environment should incorporate enhancements from wp-env for speed and
non-interactive usage
------------------------------+--------------------------
Reporter: westonruter | Owner: westonruter
Type: defect (bug) | Status: accepted
Priority: normal | Milestone: 6.8.2
Component: Build/Test Tools | Version:
Severity: normal | Resolution:
Keywords: | Focuses:
------------------------------+--------------------------
Changes (by westonruter):
* status: assigned => accepted
Old description:
> In [https://github.com/WordPress/gutenberg/issues/49168 gutenberg#49168]
> (fixed in [https://github.com/WordPress/gutenberg/pull/50007
> gutenberg#50007]), the `cli` container is kept running so that repeated
> calls to WP-CLI run very quick and avoid noisey messages like:
>
> {{{
> [+] Creating 2/2
> ✔ Container wordpress-develop-mysql-1 Running
> 0.0s
> ✔ Container wordpress-develop-php-1 Running
> }}}
>
> This should be done for the wordpress-develop environment as well, as
> currently repeated calls to `env:cli` are very slow. For example, running
> `npm run env:install` includes multiple calls to the `cli` container, and
> it takes 15 seconds on my machine. However, if the `cli` container is
> already running, then it takes just 4 seconds.
>
> Additionally, when attempting to use `env:cli` in a non-interactive
> context, Docker emits an error:
>
> {{{
> $ echo "WP Develop" | npm --silent run env:cli -- option set blogname
> [+] Creating 2/2
> ✔ Container wordpress-develop-mysql-1 Running
> 0.0s
> ✔ Container wordpress-develop-php-1 Running
> 0.0s
> the input device is not a TTY
> }}}
>
> Finally, the arguments from `npm run env:cli` are not not being passed in
> a way that allows for spaces to be used in an argument name. For example:
>
> {{{
> $ npm --silent run env:cli option set blogname "WordPress Develop"
> [+] Creating 2/2
> ✔ Container wordpress-develop-php-1 Running
> 0.0s
> ✔ Container wordpress-develop-mysql-1 Running
> 0.0s
> Error: Too many positional arguments: Develop
> }}}
>
> This is a follow-up to #63543.
New description:
In [https://github.com/WordPress/gutenberg/issues/49168 gutenberg#49168]
(fixed in [https://github.com/WordPress/gutenberg/pull/50007
gutenberg#50007]), the `cli` container is kept running so that repeated
calls to WP-CLI run very quick and avoid noisy messages like:
{{{
[+] Creating 2/2
✔ Container wordpress-develop-mysql-1 Running
0.0s
✔ Container wordpress-develop-php-1 Running
}}}
This should be done for the wordpress-develop environment as well, as
currently repeated calls to `env:cli` are very slow. For example, running
`npm run env:install` includes multiple calls to the `cli` container, and
it takes 15 seconds on my machine. However, if the `cli` container is
already running, then it takes just 4 seconds.
Additionally, when attempting to use `env:cli` in a non-interactive
context (e.g. piping content from stdin or using in a shell script),
Docker emits an error:
{{{
$ echo "WP Develop" | npm --silent run env:cli -- option set blogname
[+] Creating 2/2
✔ Container wordpress-develop-mysql-1 Running
0.0s
✔ Container wordpress-develop-php-1 Running
0.0s
the input device is not a TTY
}}}
Finally, the arguments from `npm run env:cli` are not not being passed in
a way that allows for spaces to be used in an argument name. For example:
{{{
$ npm --silent run env:cli option set blogname "WordPress Develop"
[+] Creating 2/2
✔ Container wordpress-develop-php-1 Running
0.0s
✔ Container wordpress-develop-mysql-1 Running
0.0s
Error: Too many positional arguments: Develop
}}}
This is a follow-up to #63543.
--
--
Ticket URL: <https://core.trac.wordpress.org/ticket/63564#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list