guard bravo install on linux only
Bravo tarballs and agent paths are Linux-only (/home/agent, no darwin or win32 binaries in CHECKSUMS.bravo). Without this guard, a third-party runner on macOS or Windows would try to download a Linux tarball and fail. Skip with an info message and return instead.
This commit is contained in:
parent
a480e0054e
commit
e17c10bfac
3 changed files with 9 additions and 1 deletions
4
dist/pre/index.js
vendored
4
dist/pre/index.js
vendored
|
|
@ -85989,6 +85989,10 @@ var __rest = (undefined && undefined.__rest) || function (s, e) {
|
|||
const thirdPartyProvider = detectThirdPartyRunnerProvider();
|
||||
if (thirdPartyProvider) {
|
||||
const providerLabel = thirdPartyProvider.charAt(0).toUpperCase() + thirdPartyProvider.slice(1);
|
||||
if (process.platform !== "linux") {
|
||||
lib_core.info(`Detected ${providerLabel} runner on ${process.platform}. Bravo agent is Linux-only, skipping install.`);
|
||||
return;
|
||||
}
|
||||
lib_core.info(`Detected ${providerLabel} runner environment. Installing agent-bravo.`);
|
||||
confg.correlation_id = runnerName || confg.correlation_id;
|
||||
yield callMonitorEndpoint(api_url, confg);
|
||||
|
|
|
|||
2
dist/pre/index.js.map
vendored
2
dist/pre/index.js.map
vendored
File diff suppressed because one or more lines are too long
|
|
@ -294,6 +294,10 @@ interface MonitorResponse {
|
|||
const thirdPartyProvider = detectThirdPartyRunnerProvider();
|
||||
if (thirdPartyProvider) {
|
||||
const providerLabel = thirdPartyProvider.charAt(0).toUpperCase() + thirdPartyProvider.slice(1);
|
||||
if (process.platform !== "linux") {
|
||||
core.info(`Detected ${providerLabel} runner on ${process.platform}. Bravo agent is Linux-only, skipping install.`);
|
||||
return;
|
||||
}
|
||||
core.info(`Detected ${providerLabel} runner environment. Installing agent-bravo.`);
|
||||
confg.correlation_id = runnerName || confg.correlation_id;
|
||||
await callMonitorEndpoint(api_url, confg);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue