diff --git a/src/Local/LocalBuild.php b/src/Local/LocalBuild.php
index 1801333c4..dbf9ef652 100644
--- a/src/Local/LocalBuild.php
+++ b/src/Local/LocalBuild.php
@@ -334,9 +334,9 @@ protected function buildApp($app, $destination = null)
return false;
}
}
- if (!rename($tmpBuildDir, $buildDir)) {
+ if (is_dir($tmpBuildDir) && !rename($tmpBuildDir, $buildDir)) {
$this->output->writeln(sprintf(
- 'Failed to move temporary build directory into %s',
+ 'Failed to move temporary build directory to %s',
$buildDir
));