Honor specified nuget file location (#109)

* Honor specified nuget file location

* Generate and verify nuget.config
This commit is contained in:
Zachary Eisinger
2020-09-02 11:11:56 -07:00
committed by GitHub
parent 985d576ba0
commit 3569a93d9f
6 changed files with 71 additions and 21 deletions

View File

@ -4,18 +4,20 @@ import * as core from '@actions/core';
import * as github from '@actions/github';
import * as xmlbuilder from 'xmlbuilder';
import * as xmlParser from 'fast-xml-parser';
import {ProcessEnvOptions} from 'child_process';
export function configAuthentication(
feedUrl: string,
existingFileLocation: string = ''
existingFileLocation: string = '',
processRoot: string = process.cwd()
) {
const existingNuGetConfig: string = path.resolve(
process.env['RUNNER_TEMP'] || process.cwd(),
processRoot,
existingFileLocation == '' ? 'nuget.config' : existingFileLocation
);
const tempNuGetConfig: string = path.resolve(
process.env['RUNNER_TEMP'] || process.cwd(),
processRoot,
'../',
'nuget.config'
);