Browse Source

Better exception message.

pull/8074/head
Halil İbrahim Kalkan 6 years ago
parent
commit
a2ff51dc7d
  1. 9
      framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Bundling/BundlerBase.cs

9
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Bundling/BundlerBase.cs

@ -74,8 +74,13 @@ namespace Volo.Abp.Cli.Bundling
{ {
var pathFragments = definition.Source.Split('/').ToList(); var pathFragments = definition.Source.Split('/').ToList();
var basePath = $"{pathFragments[0]}/{pathFragments[1]}"; var basePath = $"{pathFragments[0]}/{pathFragments[1]}";
var path = staticAssetsDefinitions.SelectSingleNode($"//ContentRoot[@BasePath='{basePath}']") var node = staticAssetsDefinitions.SelectSingleNode($"//ContentRoot[@BasePath='{basePath}']");
.Attributes["Path"].Value; if (node == null || node.Attributes == null)
{
throw new AbpException("Not found: " + definition.Source);
}
var path = node.Attributes["Path"].Value;
var absolutePath = definition.Source.Replace(basePath, path); var absolutePath = definition.Source.Replace(basePath, path);
content = GetFileContent(absolutePath, options.Minify); content = GetFileContent(absolutePath, options.Minify);
} }

Loading…
Cancel
Save