From a6a7ecd7026fb8ab371b34f799d4862890401f41 Mon Sep 17 00:00:00 2001 From: Rhys Arkins <rhys@arkins.net> Date: Thu, 4 Feb 2021 14:41:36 +0100 Subject: [PATCH] chore: reduce baseDir naming --- bin/clean-cache.js | 6 +++--- lib/manager/nuget/util.ts | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/bin/clean-cache.js b/bin/clean-cache.js index 1719f6b67b..d303793909 100644 --- a/bin/clean-cache.js +++ b/bin/clean-cache.js @@ -4,7 +4,7 @@ const path = require('path'); (async () => { const tmpDir = process.env.RENOVATE_TMPDIR || os.tmpdir(); - const baseDir = path.join(tmpDir, 'renovate'); - console.log('Removing ' + baseDir); - await fs.remove(baseDir); + const renovateDir = path.join(tmpDir, 'renovate'); + console.log('Removing ' + renovateDir); + await fs.remove(renovateDir); })(); diff --git a/lib/manager/nuget/util.ts b/lib/manager/nuget/util.ts index 3f8d19e2b8..b18c97efdf 100644 --- a/lib/manager/nuget/util.ts +++ b/lib/manager/nuget/util.ts @@ -41,15 +41,15 @@ export async function getConfiguredRegistries( // Valid file names taken from https://github.com/NuGet/NuGet.Client/blob/f64621487c0b454eda4b98af853bf4a528bef72a/src/NuGet.Core/NuGet.Configuration/Settings/Settings.cs#L34 const nuGetConfigFileNames = ['nuget.config', 'NuGet.config', 'NuGet.Config']; // normalize paths, otherwise startsWith can fail because of path delimitter mismatch - const baseDir = upath.normalizeSafe(localDir); + const normalizedLocalDir = upath.normalizeSafe(localDir); const nuGetConfigPath = await findUp(nuGetConfigFileNames, { - cwd: upath.dirname(upath.join(baseDir, packageFile)), + cwd: upath.dirname(upath.join(normalizedLocalDir, packageFile)), type: 'file', }); if ( !nuGetConfigPath || - upath.normalizeSafe(nuGetConfigPath).startsWith(baseDir) !== true + upath.normalizeSafe(nuGetConfigPath).startsWith(normalizedLocalDir) !== true ) { return undefined; } -- GitLab