Skip to content

Commit

Permalink
Minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Vladimir Safonkin committed Apr 19, 2021
1 parent a8c9701 commit 3edf2e9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions dist/index.js
Expand Up @@ -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}`);
Expand Down
5 changes: 3 additions & 2 deletions src/authutil.ts
Expand Up @@ -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(
Expand Down

0 comments on commit 3edf2e9

Please sign in to comment.