Skip to content

Commit bc53195

Browse files
committed
Fixes acquia#1328: Spaces in project paths break BLT.
1 parent ea5d4a1 commit bc53195

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

phing/build.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767

6868
<target name="list" hidden="true">
6969
<exec dir="${repo.root}" command="cat ${blt.root}/scripts/blt/ascii-art.txt" logoutput="true" passthru="true" checkreturn="false"/>
70-
<exec dir="${blt.root}" command="${repo.root}/vendor/bin/phing -f ${phing.dir}/build.xml -q -l" passthru="true"/>
70+
<exec dir="${blt.root}" command="${repo.root}/vendor/bin/phing -f ${phing.dir}/build.xml -q -l &amp;&amp; ${blt.root}/bin/blt-robo list" passthru="true"/>
7171
</target>
7272

7373
<target name="target-hook:invoke" description="Executes a command defined in the target-hooks array." hidden="true">

src/Robo/Commands/Blt/DoctorCommand.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ protected function executeCommandInDrupalVm($command) {
7979
protected function executeDoctorOnHost($alias) {
8080
$drush_bin = $this->getConfigValue('composer.bin') . '/drush';
8181
$include_dir = $this->getConfigValue('blt.root') . '/drush';
82-
$result = $this->taskExec("$drush_bin @$alias --include=$include_dir blt-doctor")
82+
$result = $this->taskExec("'$drush_bin' @$alias --include='$include_dir' blt-doctor")
8383
->dir($this->getConfigValue('docroot'))
8484
->detectInteractive()
8585
->run();

src/Robo/Config/DefaultConfig.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ protected function getRepoRoot() {
3939
];
4040
foreach ($possible_repo_roots as $possible_repo_root) {
4141
if (file_exists("$possible_repo_root/blt/project.yml")) {
42-
return $possible_repo_root;
42+
return str_replace(' ', '\\ ', $possible_repo_root);
4343
}
4444
}
4545

@@ -61,7 +61,7 @@ protected function getBltRoot() {
6161
];
6262
foreach ($possible_blt_roots as $possible_blt_root) {
6363
if (file_exists("$possible_blt_root/template")) {
64-
return $possible_blt_root;
64+
return str_replace(' ', '\\ ', $possible_blt_root);
6565
}
6666
}
6767

template/drush.wrapper

+3-3
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,13 @@
2828
# `../vendor/bin/drush.launcher --local $@` is a common variant for
2929
# composer-managed Drupal sites.
3030
#
31-
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
31+
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
3232
cd "`dirname $0`"
3333

34-
if [ ! -f ${DIR}/vendor/drush/drush/drush.launcher ]; then
34+
if [ ! -f "${DIR}/vendor/drush/drush/drush.launcher" ]; then
3535
echo >&2 "Drush was not found in this project's vendor directory. You can install it by typing:"
3636
echo >&2 "composer install"
3737
exit 1
3838
fi
3939

40-
vendor/drush/drush/drush.launcher --config=${DIR}/drush/drushrc.php --alias-path=${DIR}/drush/site-aliases "$@"
40+
vendor/drush/drush/drush.launcher --config="${DIR}/drush/drushrc.php" --alias-path="${DIR}/drush/site-aliases" "$@"

0 commit comments

Comments
 (0)