resolve comments from @henrymercer
This commit is contained in:
parent
0b75f471b1
commit
b4e6f81a72
9 changed files with 21 additions and 25 deletions
|
|
@ -1690,7 +1690,7 @@ export async function initConfig(
|
|||
registriesInput: string | undefined,
|
||||
configFile: string | undefined,
|
||||
dbLocation: string | undefined,
|
||||
configAsParameter: string | undefined,
|
||||
configInput: string | undefined,
|
||||
trapCachingEnabled: boolean,
|
||||
debugMode: boolean,
|
||||
debugArtifactName: string,
|
||||
|
|
@ -1706,14 +1706,10 @@ export async function initConfig(
|
|||
): Promise<Config> {
|
||||
let config: Config;
|
||||
|
||||
// if configAsParameter is set, it takes precedence over configFile
|
||||
if (configAsParameter) {
|
||||
const configFileToCreate = path.resolve(
|
||||
workspacePath,
|
||||
"user-config-from-action.yml"
|
||||
);
|
||||
fs.writeFileSync(configFileToCreate, configAsParameter);
|
||||
configFile = configFileToCreate;
|
||||
// if configInput is set, it takes precedence over configFile
|
||||
if (configInput) {
|
||||
configFile = path.resolve(workspacePath, "user-config-from-action.yml");
|
||||
fs.writeFileSync(configFile, configInput);
|
||||
logger.debug(`Using config from action input: ${configFile}`);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ export async function initConfig(
|
|||
registriesInput: string | undefined,
|
||||
configFile: string | undefined,
|
||||
dbLocation: string | undefined,
|
||||
configAsParameter: string | undefined,
|
||||
configInput: string | undefined,
|
||||
trapCachingEnabled: boolean,
|
||||
debugMode: boolean,
|
||||
debugArtifactName: string,
|
||||
|
|
@ -80,7 +80,7 @@ export async function initConfig(
|
|||
registriesInput,
|
||||
configFile,
|
||||
dbLocation,
|
||||
configAsParameter,
|
||||
configInput,
|
||||
trapCachingEnabled,
|
||||
debugMode,
|
||||
debugArtifactName,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue