Skip to content

Commit 832a783

Browse files
committed
Address minor review comments
1 parent 160e695 commit 832a783

File tree

2 files changed

+18
-11
lines changed

2 files changed

+18
-11
lines changed

lib/start-proxy-action.js

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

src/start-proxy.ts

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -116,10 +116,11 @@ export async function sendFailedStatusReport(
116116
const error = util.wrapError(unwrappedError);
117117
core.setFailed(`start-proxy action failed: ${error.message}`);
118118

119+
// To avoid the possibility of leaking sensitive information into the telemetry,
120+
// we don't include arbitrary error messages. Instead, `getSafeErrorMessage` will
121+
// return a generic message that includes the type of the error, unless it can decide
122+
// that the message is safe to include.
119123
const statusReportMessage = getSafeErrorMessage(error);
120-
121-
// We skip sending the error message and stack trace here to avoid the possibility
122-
// of leaking any sensitive information into the telemetry.
123124
const errorStatusReportBase = await createStatusReportBase(
124125
ActionName.StartProxy,
125126
getActionsStatus(error),
@@ -432,7 +433,9 @@ export async function downloadProxy(
432433
authorization: string | undefined,
433434
) {
434435
try {
435-
return toolcache.downloadTool(url, undefined, authorization, {
436+
// Download the proxy archive from `url`. We let `downloadTool` choose where
437+
// to store it. The path to the downloaded file will be returned if successful.
438+
return toolcache.downloadTool(url, /* dest: */ undefined, authorization, {
436439
accept: "application/octet-stream",
437440
});
438441
} catch (error) {
@@ -524,6 +527,5 @@ export async function getProxyBinaryPath(logger: Logger): Promise<string> {
524527
proxyInfo.version,
525528
);
526529
}
527-
proxyBin = path.join(proxyBin, proxyFileName);
528-
return proxyBin;
530+
return path.join(proxyBin, proxyFileName);
529531
}

0 commit comments

Comments
 (0)