Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Henry Mercer <[email protected]>
  • Loading branch information
redsun82 and henrymercer authored Sep 21, 2023
1 parent ab81590 commit 53bed11
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/autobuild.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,15 +117,14 @@ async function setupCppAutobuild(codeql: CodeQL, logger: Logger) {
process.env["RUNNER_ENVIRONMENT"] === "self-hosted" &&
process.env[envVar] !== "true"
) {
logger.info(`Disabling ${featureName} as we are on a self-hosted runner`);
logger.info(`This can be enabled by setting ${envVar}: true in the env`);
logger.info(`Disabling ${featureName} as we are on a self-hosted runner.` + getWorkflowEventName() !== "dynamic" ? ` To override this, set the ${envVar} environment variable to 'true' in your workflow (see https://docs.github.com/en/actions/learn-github-actions/variables#defining-environment-variables-for-a-single-workflow).` : "");
core.exportVariable(envVar, "false");
} else {
logger.info(`Enabling ${featureName}`);
logger.info(`Enabling ${featureName}. This can be disabled by setting the ${envVar} environment variable to 'false' (see https://docs.github.com/en/actions/learn-github-actions/variables#defining-environment-variables-for-a-single-workflow).`);
core.exportVariable(envVar, "true");
}
} else {
logger.info(`Disabling ${featureName}`);
logger.info(`Disabling ${featureName}.`);
core.exportVariable(envVar, "false");
}
}
Expand Down

0 comments on commit 53bed11

Please sign in to comment.