Skip to content

Commit bdd2cdf

Browse files
committed
Also include language in error status report for start-proxy, if available
1 parent fb14878 commit bdd2cdf

File tree

2 files changed

+13
-6
lines changed

2 files changed

+13
-6
lines changed

lib/start-proxy-action.js

Lines changed: 6 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/start-proxy-action.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import { pki } from "node-forge";
88
import * as actionsUtil from "./actions-util";
99
import { getApiDetails, getAuthorizationHeaderFor } from "./api-client";
1010
import { Config } from "./config-utils";
11+
import { KnownLanguage } from "./languages";
1112
import { getActionsLogger, Logger } from "./logging";
1213
import {
1314
Credential,
@@ -128,6 +129,7 @@ async function runWrapper() {
128129
actionsUtil.persistInputs();
129130

130131
const logger = getActionsLogger();
132+
let language: KnownLanguage | undefined;
131133

132134
try {
133135
// Setup logging for the proxy
@@ -137,7 +139,7 @@ async function runWrapper() {
137139

138140
// Get the configuration options
139141
const languageInput = actionsUtil.getOptionalInput("language");
140-
const language = languageInput ? parseLanguage(languageInput) : undefined;
142+
language = languageInput ? parseLanguage(languageInput) : undefined;
141143
const credentials = getCredentials(
142144
logger,
143145
actionsUtil.getOptionalInput("registry_secrets"),
@@ -171,7 +173,7 @@ async function runWrapper() {
171173
await sendSuccessStatusReport(
172174
startedAt,
173175
{
174-
languages: language ? [language] : [],
176+
languages: language && [language],
175177
},
176178
proxyConfig.all_credentials.map((c) => c.type),
177179
logger,
@@ -186,7 +188,9 @@ async function runWrapper() {
186188
ActionName.StartProxy,
187189
getActionsStatus(error),
188190
startedAt,
189-
undefined,
191+
{
192+
languages: language && [language],
193+
},
190194
await util.checkDiskUsage(logger),
191195
logger,
192196
);

0 commit comments

Comments
 (0)