@wordpress/env 8.12.0 → 9.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cli.js +2 -2
- package/lib/commands/clean.js +1 -1
- package/lib/commands/destroy.js +1 -1
- package/lib/commands/logs.js +1 -1
- package/lib/commands/run.js +5 -2
- package/lib/commands/start.js +1 -1
- package/lib/commands/stop.js +1 -1
- package/lib/test/cli.js +1 -1
- package/lib/wordpress.js +1 -1
- package/package.json +3 -3
package/lib/cli.js
CHANGED
|
@@ -58,10 +58,10 @@ const withSpinner =
|
|
|
58
58
|
'err' in error &&
|
|
59
59
|
'out' in error
|
|
60
60
|
) {
|
|
61
|
-
// Error is a docker
|
|
61
|
+
// Error is a docker compose error. That means something docker-related failed.
|
|
62
62
|
// https://github.com/PDMLab/docker-compose/blob/HEAD/src/index.ts
|
|
63
63
|
spinner.fail(
|
|
64
|
-
'Error while running docker
|
|
64
|
+
'Error while running docker compose command.'
|
|
65
65
|
);
|
|
66
66
|
if ( error.out ) {
|
|
67
67
|
process.stdout.write( error.out );
|
package/lib/commands/clean.js
CHANGED
package/lib/commands/destroy.js
CHANGED
package/lib/commands/logs.js
CHANGED
package/lib/commands/run.js
CHANGED
|
@@ -74,10 +74,13 @@ function spawnCommandDirectly( config, container, command, envCwd, spinner ) {
|
|
|
74
74
|
container === 'mysql' || container === 'tests-mysql'
|
|
75
75
|
? '/'
|
|
76
76
|
: '/var/www/html',
|
|
77
|
-
|
|
77
|
+
// Remove spaces and single quotes from both ends of the path.
|
|
78
|
+
// This is needed because Windows treats single quotes as a literal character.
|
|
79
|
+
envCwd.trim().replace( /^'|'$/g, '' )
|
|
78
80
|
);
|
|
79
81
|
|
|
80
82
|
const composeCommand = [
|
|
83
|
+
'compose',
|
|
81
84
|
'-f',
|
|
82
85
|
config.dockerComposeConfigPath,
|
|
83
86
|
'exec',
|
|
@@ -98,7 +101,7 @@ function spawnCommandDirectly( config, container, command, envCwd, spinner ) {
|
|
|
98
101
|
// cannot use it to spawn an interactive command. Thus, we run docker-
|
|
99
102
|
// compose on the CLI directly.
|
|
100
103
|
const childProc = spawn(
|
|
101
|
-
'docker
|
|
104
|
+
'docker',
|
|
102
105
|
composeCommand,
|
|
103
106
|
{ stdio: 'inherit' },
|
|
104
107
|
spinner
|
package/lib/commands/start.js
CHANGED
package/lib/commands/stop.js
CHANGED
package/lib/test/cli.js
CHANGED
|
@@ -138,7 +138,7 @@ describe( 'env cli', () => {
|
|
|
138
138
|
await env.start.mock.results[ 0 ].value.catch( () => {} );
|
|
139
139
|
|
|
140
140
|
expect( spinner.fail ).toHaveBeenCalledWith(
|
|
141
|
-
'Error while running docker
|
|
141
|
+
'Error while running docker compose command.'
|
|
142
142
|
);
|
|
143
143
|
expect( process.stderr.write ).toHaveBeenCalledWith( 'failure error' );
|
|
144
144
|
expect( process.exit ).toHaveBeenCalledWith( 1 );
|
package/lib/wordpress.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/env",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "9.0.0",
|
|
4
4
|
"description": "A zero-config, self contained local WordPress environment for development and testing.",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"chalk": "^4.0.0",
|
|
36
36
|
"copy-dir": "^1.3.0",
|
|
37
|
-
"docker-compose": "^0.
|
|
37
|
+
"docker-compose": "^0.24.3",
|
|
38
38
|
"extract-zip": "^1.6.7",
|
|
39
39
|
"got": "^11.8.5",
|
|
40
40
|
"inquirer": "^7.1.0",
|
|
@@ -51,5 +51,5 @@
|
|
|
51
51
|
"scripts": {
|
|
52
52
|
"test": "echo \"Error: run tests from root\" && exit 1"
|
|
53
53
|
},
|
|
54
|
-
"gitHead": "
|
|
54
|
+
"gitHead": "fcf61b4beff747222c2c81d09d757ca1a0abd925"
|
|
55
55
|
}
|