Browse Source

Cli: Don't run npm/yarn install in the directory the doesn't have package.json

pull/13059/head
Yunus Emre Kalkan 4 years ago
parent
commit
5d8ae9540e
  1. 9
      framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/LIbs/InstallLibsService.cs

9
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/LIbs/InstallLibsService.cs

@ -78,8 +78,15 @@ public class InstallLibsService : IInstallLibsService, ITransientDependency
}
// MVC or BLAZOR SERVER
if (projectPath.EndsWith("csproj"))
if (projectPath.EndsWith(".csproj"))
{
var packageJsonFilePath = Path.Combine(Path.GetDirectoryName(projectPath), "package.json");
if (!File.Exists(packageJsonFilePath))
{
continue;
}
if (IsYarnAvailable())
{
RunYarn(projectDirectory);

Loading…
Cancel
Save