mirror of
https://github.com/github/codeql-action.git
synced 2026-01-04 21:50:17 +08:00
Parse language before calling getCredentials
This commit is contained in:
7
lib/start-proxy-action.js
generated
7
lib/start-proxy-action.js
generated
@@ -95087,8 +95087,7 @@ var LANGUAGE_TO_REGISTRY_TYPE = {
|
||||
rust: ["cargo_registry"],
|
||||
go: ["goproxy_server", "git_source"]
|
||||
};
|
||||
function getCredentials(logger, registrySecrets, registriesCredentials, languageString) {
|
||||
const language = languageString ? parseLanguage(languageString) : void 0;
|
||||
function getCredentials(logger, registrySecrets, registriesCredentials, language) {
|
||||
const registryTypeForLanguage = language ? LANGUAGE_TO_REGISTRY_TYPE[language] : void 0;
|
||||
let credentialsStr;
|
||||
if (registriesCredentials !== void 0) {
|
||||
@@ -95780,11 +95779,13 @@ async function runWrapper() {
|
||||
const tempDir = getTemporaryDirectory();
|
||||
const proxyLogFilePath = path.resolve(tempDir, "proxy.log");
|
||||
core11.saveState("proxy-log-file", proxyLogFilePath);
|
||||
const languageInput = getOptionalInput("language");
|
||||
const language = languageInput ? parseLanguage(languageInput) : void 0;
|
||||
const credentials = getCredentials(
|
||||
logger,
|
||||
getOptionalInput("registry_secrets"),
|
||||
getOptionalInput("registries_credentials"),
|
||||
getOptionalInput("language")
|
||||
language
|
||||
);
|
||||
if (credentials.length === 0) {
|
||||
logger.info("No credentials found, skipping proxy setup.");
|
||||
|
||||
Reference in New Issue
Block a user