diff --git a/bin/clean-cache.js b/bin/clean-cache.js index 1719f6b67bf2a21c69d14af89ec2153e4e1ac184..d303793909ee03f3240df8d48c20e877303caebf 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 3f8d19e2b8867a41f30b53e9ab42af23c1715995..b18c97efdf8194dbfb326308b455ef6c8387adda 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; }