Skip to content

Commit

Permalink
Merge pull request #32 from SymfonyCasts/run-sass-better-exception
Browse files Browse the repository at this point in the history
Better exception if the built file is not present
  • Loading branch information
bocharsky-bw committed Nov 14, 2023
2 parents 542b3c9 + 7a9bd54 commit e4cdfdc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/AssetMapper/SassCssCompiler.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public function compile(string $content, MappedAsset $asset, AssetMapperInterfac

$asset->addFileDependency($cssFile);

if (($content = file_get_contents($cssFile)) === false) {
if (!is_file($cssFile) || ($content = file_get_contents($cssFile)) === false) {
throw new \RuntimeException('The file '.$cssFile.' doesn\'t exist, run php bin/console sass:build');
}

Expand Down

0 comments on commit e4cdfdc

Please sign in to comment.