Skip to content

Commit

Permalink
Build index.js
Browse files Browse the repository at this point in the history
  • Loading branch information
Vladimir Safonkin committed Apr 19, 2021
1 parent d08d219 commit 07b4a80
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4840,11 +4840,22 @@ 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 == '' ? 'nuget.config' : existingFileLocation);
const existingNuGetConfig = path.resolve(processRoot, existingFileLocation == ''
? getExistingNugetConfig(processRoot)
: existingFileLocation);
const tempNuGetConfig = path.resolve(processRoot, '../', 'nuget.config');
writeFeedToFile(feedUrl, existingNuGetConfig, tempNuGetConfig);
}
exports.configAuthentication = configAuthentication;
function getExistingNugetConfig(processRoot) {
const configFileNames = fs
.readdirSync(processRoot)
.filter(filename => filename.toLowerCase() == 'nuget.config');
if (configFileNames.length) {
return configFileNames[0];
}
return 'nuget.config';
}
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}`);
let xml;
Expand Down

0 comments on commit 07b4a80

Please sign in to comment.