From 3edf2e9363275b7fcf1d3210aa362f26c07287ab Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Mon, 19 Apr 2021 16:16:44 +0300 Subject: [PATCH] Minor fix --- dist/index.js | 5 +++-- src/authutil.ts | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/dist/index.js b/dist/index.js index 3b057b7..28caa4a 100644 --- a/dist/index.js +++ b/dist/index.js @@ -4848,13 +4848,14 @@ function configAuthentication(feedUrl, existingFileLocation = '', processRoot = } exports.configAuthentication = configAuthentication; function getExistingNugetConfig(processRoot) { + const defaultConfigName = 'nuget.config'; const configFileNames = fs .readdirSync(processRoot) - .filter(filename => filename.toLowerCase() === 'nuget.config'); + .filter(filename => filename.toLowerCase() === defaultConfigName); if (configFileNames.length) { return configFileNames[0]; } - return 'nuget.config'; + return defaultConfigName; } function writeFeedToFile(feedUrl, existingFileLocation, tempFileLocation) { console.log(`dotnet-auth: Finding any source references in ${existingFileLocation}, writing a new temporary configuration file with credentials to ${tempFileLocation}`); diff --git a/src/authutil.ts b/src/authutil.ts index 77d66f6..d8ddef0 100644 --- a/src/authutil.ts +++ b/src/authutil.ts @@ -28,13 +28,14 @@ export function configAuthentication( } function getExistingNugetConfig(processRoot: string) { + const defaultConfigName = 'nuget.config'; const configFileNames = fs .readdirSync(processRoot) - .filter(filename => filename.toLowerCase() === 'nuget.config'); + .filter(filename => filename.toLowerCase() === defaultConfigName); if (configFileNames.length) { return configFileNames[0]; } - return 'nuget.config'; + return defaultConfigName; } function writeFeedToFile(