From a8c97016ef885352c99d116af10e48786cda01ca Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Mon, 19 Apr 2021 16:11:14 +0300 Subject: [PATCH] Minor fix --- dist/index.js | 4 ++-- src/authutil.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dist/index.js b/dist/index.js index 199f644..3b057b7 100644 --- a/dist/index.js +++ b/dist/index.js @@ -4840,7 +4840,7 @@ const github = __importStar(__webpack_require__(469)); const xmlbuilder = __importStar(__webpack_require__(312)); const xmlParser = __importStar(__webpack_require__(989)); function configAuthentication(feedUrl, existingFileLocation = '', processRoot = process.cwd()) { - const existingNuGetConfig = path.resolve(processRoot, existingFileLocation == '' + const existingNuGetConfig = path.resolve(processRoot, existingFileLocation === '' ? getExistingNugetConfig(processRoot) : existingFileLocation); const tempNuGetConfig = path.resolve(processRoot, '../', 'nuget.config'); @@ -4850,7 +4850,7 @@ exports.configAuthentication = configAuthentication; function getExistingNugetConfig(processRoot) { const configFileNames = fs .readdirSync(processRoot) - .filter(filename => filename.toLowerCase() == 'nuget.config'); + .filter(filename => filename.toLowerCase() === 'nuget.config'); if (configFileNames.length) { return configFileNames[0]; } diff --git a/src/authutil.ts b/src/authutil.ts index 54a2d3f..77d66f6 100644 --- a/src/authutil.ts +++ b/src/authutil.ts @@ -13,7 +13,7 @@ export function configAuthentication( ) { const existingNuGetConfig: string = path.resolve( processRoot, - existingFileLocation == '' + existingFileLocation === '' ? getExistingNugetConfig(processRoot) : existingFileLocation ); @@ -30,7 +30,7 @@ export function configAuthentication( function getExistingNugetConfig(processRoot: string) { const configFileNames = fs .readdirSync(processRoot) - .filter(filename => filename.toLowerCase() == 'nuget.config'); + .filter(filename => filename.toLowerCase() === 'nuget.config'); if (configFileNames.length) { return configFileNames[0]; }