We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0f380f1 commit 8d5d3f7Copy full SHA for 8d5d3f7
tools/local-env/scripts/install.js
@@ -67,6 +67,15 @@ function wp_cli( cmd ) {
67
execSync( `npm --silent run env:cli -- ${cmd} --path=/var/www/${process.env.LOCAL_DIR}`, { stdio: 'inherit' } );
68
}
69
70
+/**
71
+ * Runs a WP-CLI command in the Docker environment with retry logic.
72
+ *
73
+ * If the command fails, the function will retry the command the
74
+ * specified number of times with a short delay between attempts.
75
76
+ * @param {string} cmd The WP-CLI command to run.
77
+ * @param {number} retries The number of retries left. Default to 5.
78
+ */
79
function wp_cli_retry( cmd, retries = 5 ) {
80
try {
81
wp_cli( cmd );
0 commit comments