Browse Source
Merge pull request #21591 from abpframework/update-libs-command
CLI: Pass --no-audit param to npm install command
pull/21594/head
Enis Necipoglu
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with
5 additions and
4 deletions
-
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/LIbs/InstallLibsService.cs
-
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Utils/NpmHelper.cs
|
|
|
@ -72,7 +72,7 @@ public class InstallLibsService : IInstallLibsService, ITransientDependency |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
NpmHelper.RunNpmInstall(projectDirectory); |
|
|
|
NpmHelper.RunNpmInstall(projectDirectory, "--no-audit"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@ -92,7 +92,7 @@ public class InstallLibsService : IInstallLibsService, ITransientDependency |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
NpmHelper.RunNpmInstall(projectDirectory); |
|
|
|
NpmHelper.RunNpmInstall(projectDirectory, "--no-audit"); |
|
|
|
} |
|
|
|
|
|
|
|
await CleanAndCopyResources(projectDirectory); |
|
|
|
|
|
|
|
@ -1,4 +1,5 @@ |
|
|
|
using System; |
|
|
|
using System.Collections.Generic; |
|
|
|
using System.Linq; |
|
|
|
using Microsoft.Extensions.Logging; |
|
|
|
using Microsoft.Extensions.Logging.Abstractions; |
|
|
|
@ -48,10 +49,10 @@ public class NpmHelper : ITransientDependency |
|
|
|
return version > SemanticVersion.Parse("1.20.0"); |
|
|
|
} |
|
|
|
|
|
|
|
public void RunNpmInstall(string directory) |
|
|
|
public void RunNpmInstall(string directory, params string[] args) |
|
|
|
{ |
|
|
|
Logger.LogInformation($"Running npm install on {directory}"); |
|
|
|
CmdHelper.RunCmd($"npm install", directory); |
|
|
|
CmdHelper.RunCmd($"npm install {args.JoinAsString(" ")}", directory); |
|
|
|
} |
|
|
|
|
|
|
|
public void RunYarn(string directory) |
|
|
|
|