sed
command fails when using Windows paths - colon delimeter interferes with path
#261
Open
2 tasks done
Bug Report
Describe the current, buggy behavior
Scaffolding tests in Windows requires manual intervention in
wp-tests-config.php
(see this issue) when using the default tests path. Manually setting WP_CORE_DIR and WP_TESTS_DIR can prevent this by using something likeC:\Users{User}\AppData\Local\Temp/wordpress/
and then runninginstall-wp-tests
. But the colon causes the following sed command to fail:sed $ioption "s:dirname( __FILE__ ) . '/src/':'$WP_CORE_DIR/':" "$WP_TESTS_DIR"/wp-tests-config.php
Describe how other contributors can replicate this bug
WP_CORE_DIR
andWP_TESTS_DIR
with the formatC:/somewhere/you/want/to/keep/tests
as opposed to/c/somewhere/you/want/to/keep/tests
:install-wp-tests
sed: -e expression #1, char 36: unknown option to `s'
Workaround-ish
install-wp-tests
require_once
error described here, which can be fixed with the last comment shared thereDescribe what you would expect as the correct outcome
Ideally you would get started testing without manual intervention.
Let us know what environment you are running this on
Provide a possible solution
The colon is the problem and either needs to be escaped or another delimiter used. Maybe
|
? The PR for that is like two lines and I've successfully tested that as an alternative, so I can provide if necessary.The text was updated successfully, but these errors were encountered: