diff --git a/packages/env/CHANGELOG.md b/packages/env/CHANGELOG.md index 767b382e1e096f..606ab6fa61c662 100644 --- a/packages/env/CHANGELOG.md +++ b/packages/env/CHANGELOG.md @@ -5,7 +5,7 @@ ### Breaking Change - Docker containers now run as the host user. This should resolve problems with permissions arising from different owners -between the host, web container, and cli container. If you still encounter permissions issues, try running `npx wp-env destroy` so that the environment can be recreated with the correct permissions. + between the host, web container, and cli container. If you still encounter permissions issues, try running `npx wp-env destroy` so that the environment can be recreated with the correct permissions. ### New feature @@ -18,10 +18,6 @@ between the host, web container, and cli container. If you still encounter permi - Ensure `wordpress`, `tests-wordpress`, `cli`, and `tests-cli` always build the correct Docker image. -### Enhancement - -- `wp-env run ...` now uses docker-compose exec instead of docker-compose run. As a result, it is much faster, since commands are executed against existing services, rather than creating them from scratch each time. - ## 6.0.0 (2023-04-26) ### Breaking Change diff --git a/packages/env/lib/commands/run.js b/packages/env/lib/commands/run.js index 1e13f7a797c38a..93a79c9cf5b29d 100644 --- a/packages/env/lib/commands/run.js +++ b/packages/env/lib/commands/run.js @@ -63,12 +63,10 @@ function spawnCommandDirectly( config, container, command, envCwd, spinner ) { // We need to pass absolute paths to the container. envCwd = path.resolve( '/var/www/html', envCwd ); - const isTTY = process.stdout.isTTY; const composeCommand = [ '-f', config.dockerComposeConfigPath, - 'exec', - ! isTTY ? '--no-TTY' : '', + 'run', '-w', envCwd, '--user', diff --git a/phpunit/class-override-script-test.php b/phpunit/class-override-script-test.php index b3af1acd80f446..0bc3bc5853ae1e 100644 --- a/phpunit/class-override-script-test.php +++ b/phpunit/class-override-script-test.php @@ -40,7 +40,7 @@ public function test_localizes_script() { ); $script = $wp_scripts->query( 'gutenberg-dummy-script', 'registered' ); - $this->assertEquals( array( 'dependency', 'wp-i18n' ), $script->deps ); + $this->assertEquals( array( 'dependency' ), $script->deps ); } /** @@ -60,7 +60,7 @@ public function test_replaces_registered_properties() { $script = $wp_scripts->query( 'gutenberg-dummy-script', 'registered' ); $this->assertEquals( 'https://example.com/updated', $script->src ); - $this->assertEquals( array( 'updated-dependency', 'wp-i18n' ), $script->deps ); + $this->assertEquals( array( 'updated-dependency' ), $script->deps ); $this->assertEquals( 'updated-version', $script->ver ); $this->assertSame( 1, $script->args ); } @@ -82,7 +82,7 @@ public function test_registers_new_script() { $script = $wp_scripts->query( 'gutenberg-second-dummy-script', 'registered' ); $this->assertEquals( 'https://example.com/', $script->src ); - $this->assertEquals( array( 'dependency', 'wp-i18n' ), $script->deps ); + $this->assertEquals( array( 'dependency' ), $script->deps ); $this->assertEquals( 'version', $script->ver ); $this->assertSame( 1, $script->args ); }