Skip to content

Commit

Permalink
create folders and temp file for asset command, fixes yiisoft#7473
Browse files Browse the repository at this point in the history
  • Loading branch information
schmunk42 committed Feb 26, 2015
1 parent e83b479 commit 305433f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions framework/console/controllers/AssetController.php
Expand Up @@ -11,6 +11,7 @@
use yii\console\Exception;
use yii\console\Controller;
use yii\helpers\Console;
use yii\helpers\FileHelper;
use yii\helpers\VarDumper;
use yii\web\AssetBundle;

Expand Down Expand Up @@ -326,6 +327,11 @@ protected function loadTargets($targets, $bundles)
protected function buildTarget($target, $type, $bundles)
{
$tempFile = $target->basePath . '/' . strtr($target->$type, ['{hash}' => 'temp']);
if (!is_file($tempFile)) {
FileHelper::createDirectory(dirname($tempFile), 0755, true);
touch($tempFile);
}

$inputFiles = [];

foreach ($target->depends as $name) {
Expand Down

0 comments on commit 305433f

Please sign in to comment.