Escape path before `wp-config.php` string replacement by octalmage · Pull Request #5368 · wp-cli/wp-cli

Due to the way wp-cli modifies the wp-config.php when loading, and the fact that Windows allows single quotes in account names, a user with a single quote in their account name will get fatal errors when the wp-config.php const replacement ends up like this:

/* That's all, stop editing! Happy publishing. */
/** Absolute path to the WordPress directory. */
if ( ! defined( 'ABSPATH' ) ) {
        define( 'ABSPATH', 'C:\Users\local's\Local Sites\dickens-llc\app\public' . '/' );
}

Notice the single quote in the username breaking the quoted path.

More details on this issue can be found here: #1631

This patch resolved the problem for us, and we're currently using it in a forked build. Would love to see it included in core!