Merge pull request #17620 from abpframework/EngincanV/cli-switch

CLI: Add .npmrc file before searching for the nightly package versions
pull/17621/head
İsmail ÇAĞDAŞ 1 year ago committed by GitHub
commit 902d026011
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -64,6 +64,18 @@ public class NpmPackagesUpdater : ITransientDependency
_npmGlobalPackagesChecker.Check();
foreach (var file in fileList)
{
if (includePreviews)
{
await CreateNpmrcFileAsync(Path.GetDirectoryName(file));
}
else if (switchToStable)
{
await DeleteNpmrcFileAsync(Path.GetDirectoryName(file));
}
}
var packagesUpdated = new ConcurrentDictionary<string, bool>();
async Task UpdateAsync(string file)
@ -80,15 +92,6 @@ public class NpmPackagesUpdater : ITransientDependency
{
var fileDirectory = Path.GetDirectoryName(file.Key).EnsureEndsWith(Path.DirectorySeparatorChar);
if (includePreviews)
{
await CreateNpmrcFileAsync(Path.GetDirectoryName(file.Key));
}
else if (switchToStable)
{
await DeleteNpmrcFileAsync(Path.GetDirectoryName(file.Key));
}
if (await NpmrcFileExistAsync(fileDirectory))
{
RunNpmInstall(fileDirectory);

Loading…
Cancel
Save