Commit 0d12da0
committed
Build/Test Tools: Improve
* Force WP-CLI to use the `wp-config.php` in the directory above the `src` directory via the `WP_CONFIG_PATH` environment variable [read by WP-CLI](https://github.com/wp-cli/wp-cli/blob/2800ad0a66747a826ae4221b2f022f1df6779cb6/php/utils.php#L328-L329) in the `wp_locate_config()` function.
* Update the `env:install` command to write out the config at the repo root instead of writing it inside of the `ABSPATH` only then to move it one directory up.
* Fix JSHint issues.
* Add error handling to when `npm run env:install` is executed without having first done `npm run env:start`, in which case the script will end with an exit code of 1 and emit:
> Error: It appears the development environment has not been started. Message: Timed out waiting for: tcp:localhost:8000
> Did you forget to do 'npm run env:start'?
Reviewed by audrasjb.
Merges [60305] to the 6.8 branch.
Fixes #63543.
Props westonruter, jorbin, SirLouen.
git-svn-id: https://develop.svn.wordpress.org/branches/6.8@60431 602fd350-edb4-49c9-b593-d223f7449a82env:install command with better configurability and error handling.1 parent 49a6250 commit 0d12da0
2 files changed
+20
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
| 109 | + | |
109 | 110 | | |
110 | 111 | | |
111 | 112 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
1 | 3 | | |
2 | 4 | | |
3 | 5 | | |
4 | 6 | | |
5 | | - | |
| 7 | + | |
6 | 8 | | |
7 | 9 | | |
8 | 10 | | |
| |||
12 | 14 | | |
13 | 15 | | |
14 | 16 | | |
15 | | - | |
| 17 | + | |
16 | 18 | | |
17 | 19 | | |
18 | 20 | | |
| |||
23 | 25 | | |
24 | 26 | | |
25 | 27 | | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | 28 | | |
30 | 29 | | |
31 | 30 | | |
32 | 31 | | |
33 | 32 | | |
34 | 33 | | |
35 | | - | |
36 | | - | |
| 34 | + | |
| 35 | + | |
37 | 36 | | |
38 | 37 | | |
39 | 38 | | |
40 | 39 | | |
41 | | - | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
42 | 49 | | |
43 | 50 | | |
44 | 51 | | |
45 | 52 | | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
46 | 57 | | |
47 | 58 | | |
48 | 59 | | |
| |||
0 commit comments